Simple table creation. Two dots (.) are used to concatenate strings (or a - string and a number). Multiple assignment showing different number formats. Multiple assignments allows one line to swap two variables. ] ] print (a ) print (b ) print (c ) ] = ] -[=[ - Assignments. With 'single' and "double" quoted strings inside. Keywords cannot be used for variable names, - 'and' is a keyword, but AND is not, so it is a legal variable name.ĪND = 3 print (AND ) ] = ] -[=[ - Strings.Ī = "single 'quoted' string and double \"quoted \" string inside"ī = 'single \'quoted \' string and double "quoted" string inside' Lua reserved words are: and, break, do, else, elseif, - end, false, for, function, if, in, local, nil, not, or, - repeat, return, then, true, until, while. Lua is case sensitive so all variable names
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |