Actions: Control Structures
break
Break out of the current control structure and continue.
case
Create a case to use within a switch control structure.
Argument | Description |
---|---|
Value | The value to set variable to (input or another variable) |
catch
Defines the block which runs when a try structure encounters an error.
Argument | Description |
---|---|
Variable | The variable to store the error, if one occurs |
else
Adds a block for ‘all other cases’ of a control structure.
else if property
Additional condition to check the value of a property.
Argument | Description |
---|---|
Element | The element to have its property compared. |
Property | The attribute that is to be compared. |
Operator | The comparison operator to use |
Value | The value to compare to |
else if variable
Add an additional if condition to an existing control structure block, referencing a variable.
Argument | Description |
---|---|
ThisValue | The value to set variable to (input or another variable) |
ThisVariable | The variable to set the value of. |
Operator | The comparison operator for comparing values in the table against the input value. |
end if
Marks the end of a IF/ELSEIF/ELSE structure.
end repeat
Marks the end of a repeat structure.
end switch
Marks the end of a switch structure.
end try
Ends a try block.
exit repeat
Exits the repeat current repeat loop.
finally
Runs all lines below it, inside a try structure, whether there is an error or not.
if property
Creates the first condition referencing a property.
Argument | Description |
---|---|
Element | The element to have its property compared. |
Property | The attribute that is to be compared. |
Operator | The comparison operator to use |
Value | The Value to compare to |
if variable
Creates the first line of an if condition referencing a variable.
Argument | Description |
---|---|
ThisValue | The value to set variable to (input or another variable) |
ThisVariable | The variable to set the value of. |
Operator | The comparison operator for comparing values in the table against the input value. |
next repeat
Skips the rest of the repeat control structure and returns to the top for the next repeat.
repeat
Repeat a code block n number of times.
Argument | Description |
---|---|
Number | Specify the number of times the repeat block will run |
switch property
Begins a switch block where the value of a property is compared.
Argument | Description |
---|---|
Element | The element to have its property compared. |
Property | The attribute that is to be compared. |
switch variable
Begins a switch block where the value of a variable is compared.
Argument | Description |
---|---|
Variable | The variable to use in the SWITCH control structure |
try
Runs the code within its block, and returns and runs the catch block if an execution error occurs.
This chapter was last updated on Wed 12 Jul 2023 22:12:12 BST