My first novice LUA question...

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Peteroid
Posts: 162
Joined: Wed Aug 11, 2010 7:57 pm
Location: las vegas, NV
Contact:

My first novice LUA question...

Post 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)?
[==Peter==]
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 7:27 am
Location: España / Spain

Post 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
Post Reply