User Tools

Site Tools


script_syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
script_syntax [2020/01/19 18:39] justinscript_syntax [2020/01/19 18:51] justin
Line 44: Line 44:
 ====While Loop==== ====While Loop====
 **While loops** allow you to execute a set of statements repeatedly as long as a particular condition evaluates to true. In the order listed, it consists of the keyword "while", a condition to check, the "do" keyword, any statements to execute if the condition is true, and lastly the "end" keyword. See [[Conditional Expression]] for more information and a list of valid comparison operators that can be used in the condition. **While loops** allow you to execute a set of statements repeatedly as long as a particular condition evaluates to true. In the order listed, it consists of the keyword "while", a condition to check, the "do" keyword, any statements to execute if the condition is true, and lastly the "end" keyword. See [[Conditional Expression]] for more information and a list of valid comparison operators that can be used in the condition.
 +
 +**Examples:**
 +<code lua>
 +</code>
  
 ====For Loop==== ====For Loop====
-**For loops**+**For loops** allow you execute a set of statements a given number of times based on an iterable expression (e.g. an [[array]] of values). In the order listed, it consists of the keyword "for", a variable name that the current value will be assigned to, the "in" keyword, an expression to iterate though, the "do" keyword, any number of statements to execute, and lastly the "end" keyword. As [[array]] functionality is still in development, there are only a small number of uses cases for "For" loops currently. 
 + 
 +**Examples:** 
 +<code lua> 
 +</code>
  
 =====Literals===== =====Literals=====
script_syntax.txt · Last modified: 2023/11/06 14:13 by justin