09-07-2017, 06:24 AM
(09-07-2017, 06:05 AM)kyonides Wrote: Some of your previous questions were answered in my previous post that I kept updating without noticing there were new posts available here...
< is lesser than anything you can find to its right hand side
1 < 2
yeah, a one year old baby is younger than a two year old baby, the first one has less experience in general, has not attempted to utter a single word like dad or mom.
class MotherClass
def how_to_eat
@use_fork_or_spoon = true
end
end
class ChildClass < MotherClass
end
Child inherits attributes or abilities from his or her mother so it learns stuff so the child has learned how to eat properly at the table. Really, he or she will use a fork or spoon to pick a vegetable instead of using his or her hands to lift it.
And << two lesser than symbols means an assignment by pushing a value, a kiwi, a number, a name or just anything to an Array.
@ary = []
@ary << 1
print @ary #=> [1]
OK so a child is weaker then mom (that makes sense!)
even if its written as Mom>child or child<MomĀ its pretty much the same thing?
@ary? ok so @ means instance which is tighter scripting for calling up different parts of the script while $ can jump scripts but is wiggly like a loose cord
so the @ means its strong but whats "ary"?
and using 2 "pacman's"<< will launch whatever you use it on into a array/boxlist for sorting stuff?
new logo for Yesteryear created by Lunarberry!