IF/SELECT: Difference between revisions

1,287 bytes added ,  4 years ago
no edit summary
No edit summary
No edit summary
Line 9:
! IF
! Variable
! Relational Operator
! Math
! Variable
! Action
Line 32:
! IF
! Variable
! Relational Operator
! Math
! Variable
! Modifier
Line 51:
|JMP
|LBL[2]
|}<br />
 
=== Relational Operators ===
When selecting an IF statement, the first choice to be made is the relational operator within the equation to be evaluated.
{| class="wikitable"
|+Relational Operator Types
!Symbol
!Name
!Evalues To "True" When
|-
|=
|Equal To
|The left variable is equal to the right variable.
|-
|<>
|Not Equals
|The left variable is not equal to the right variable.
|-
|<
|Less Than
|The left variable is less than the right variable.
|-
|<=
|Less Than or Equal To
|The left variable is less than or equal to the right variable.
|-
|>
|Greater Than
|The left variable is greater than the right variable.
|-
|>=
|Greater Than or Equal To
|The left variable is greater than or equal to the right variable.
|-
|(...)
|Mixed Logic
|
|}
 
=== Actions ===
In the event the equation evaluates as true, an action will occur. The following table lists the possible actions an IF statement can take.
{| class="wikitable"
|+Action Types
!Action
!Destination
!Description
|-
|[[JMP/LBL|JMP]]
|LBL[#]
|The program will jump to the labeled line and continue from there.
|-
|[[CALL]]
|Program
|A program is CALLED. When the called program reaches the [END] instruction, it will return to the next line after the IF statement.
|-
|Call
|Program()
|
|}