Lua from Other Languages: Difference between revisions

elseif
>Myrkos
(Undo revision 36918 by Myrkos (Talk))
>Mattchewy
(elseif)
Line 14: Line 14:
===Differences===
===Differences===
* '''null''' is known as '''nil'''.
* '''null''' is known as '''nil'''.
* '''else if''' is combined into one keyword '''elseif'''
* Lua is dynamically typed (rather than statically), so you do not need to declare the type of variable before you can use it. You can change variables from being tables to numbers.
* Lua is dynamically typed (rather than statically), so you do not need to declare the type of variable before you can use it. You can change variables from being tables to numbers.
* Lua uses different arrays that are known as tables. Tables have numerical, string and table indexes. Strings in Lua are not tables.
* Lua uses different arrays that are known as tables. Tables have numerical, string and table indexes. Strings in Lua are not tables.
Anonymous user