Lua - if statement

Published 2014/03/03 by Admin in LUA
Tags: , , , ,

The if statement in coding is used for logic and sequential state machine control. Basically it helps the application decide what to do next based on a set of values that need to correspond to the logic flow requirement.

a = 1

if a==1 then

print ("a is one")

end


The following words are all reserved for internal functions in Lua.

These words cannot be used for variable names, but Lua is case sensitive, so 'and' is reserved and can't be a variable, but 'aND, aNd, AND, anD, AnD, And, ANd' are not reserved and can be used as variables.


my coding

This is a collection of all the coding gems I have found and would like to share with the world!