09-06-2017, 11:13 PM
(09-06-2017, 11:01 PM)DerVVulfman Wrote:(09-06-2017, 07:31 PM)Siletrea Wrote: 4: it uses "pacman" < and "reverse pacman" > along with "hashtag" # "money" $ "star" * "squiggly A" @ and a buttload of "dots" . and "double dots" : just to list a few
Symbolism Syntax:
- * star ... actual name is "asterisk". We use a lot for math as the multiplication symbol.
- # hashtag ... has been referred to as the pound symbol (as in weight measurement).
- $ money ... er, just the dollar symbol here. We use to define a special 'global' variable.
- @ squiggly 'a' ... officially called the 'commercial' symbol, usually recognized as the 'at' symbol. We use to make 'instance' variables'*
- & thingie (not listed) ... we think of as the 'and' symbol is called an ampersand. Good for doing if... tests. 'if this & that.'
* For scripters, instance variables are better to use than globals. They use less resources, and forces better coding.
OHHHH ok! this definitely helps! just knowing what the proper term for * is really helps clarify things!
star = asterisk
exponent = **
but what do exponents do?
and @ is better then $ because while $ lets you access anything from other scripts @ is less flimsy?
the only parts confusing me now about the previous explanation is this
Quote:you can use an asterisk to make an array if it's an argument included in a method definition, i.e.
def my_method(name, *arguments)
print name, arguments.class
end
my_method #=> Pop up window shows up telling you the name you passed through and Array as arguments actual class.
argument?
method definition?
the need for "def" which I think means "Definition"
and ".class"
and why is almost everything called a variable? what IS a variable?
sorry if I'm prying here and this seems stupid but I get hung up on stuff like this unless its explained fully I won't be able to take anything from it!
new logo for Yesteryear created by Lunarberry!