Lua - repeat until statement

Published 2014/03/03 by Admin in LUA

The repeat until statement allows you to perform a repetitive task until a certain condition is met.

a=0

repeat

a=a+1

print(a)

until a==5

Output:

1

2

3

4

5


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!