[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Variable name to save information to or one of the 'conditional' statements.
<Variable> = Another variable that this one is to have the same value as.
<Constant> = One of the available built in SE constants.
<Operator> = See below for available 'Operators'.
<Value> = Another 'value' that this variable is to be equal to.
The general purpose expression instruction.
This instruction is capable of setting variables, and creating general if, skip if, and while statements. This is the instruction that must be used to create any conditional statement that tests for a condition other than null.
An entire loop can be created using nothing but variations of this statement and end:
Example:
- $Loop = 0
while $Loop < 10
| $Loop = $Loop + 1
end
The following lists gives all the supported operators in order of their evaluation precedence:
- Primary: ( and ) precedence override – to explicitly give the order of operator evaluation
- Unary: ~ arithmetic negation (bitwise complement), ! logical negation
- Multiplicative: * arithmetic multiplication, / arithmetic division, mod arithmetic modulo
- Additive: + arithmetic addition, - arithmetic subtraction
- Relational: < less than, > greater than, <= less than or equal to, >= greater than or equal to
- Equality: == equal to, != not equal to
- & bitwise AND
- ^ bitwise exclusive OR
- | bitwise inclusive OR
- AND logical AND (0 and null are FALSE, any other value is TRUE)
- OR logical OR
- mod See this link for an explanation of modulo.
- Bracketry: ( and ) Primary inclusive, do this before what is outside them.
Command Location:
- »» General Commands
<RetVar/IF> = [<Variable> | <Constant> | <Operator> | <Value>] [...]