Page 1 of 1

My first novice LUA question...

Posted: Sat Sep 18, 2010 7:49 pm
by Peteroid
I'll probably have questions from time to time since I started studying LUA today.

OK. Is it true that since all variables are of 'no type' (or more specifically, the type of whatever value they hold) that they are not declared? Is this implied by it's first use (within the scope it is contained that is, and assuming a value of 'nil upon first usage if not assigned a value)?

Posted: Sun Sep 19, 2010 12:26 am
by Genete
http://www.lua.org/manual/5.1/manual.html#2
This the better explanation to your questions. Yes they have not need to be defined and if not assigned, its value is nil.
-G