IFELSEcondition
true.instructionlist
false.instructionlist
Command or operation where:
If condition
evaluates to TRUE, then IFELSE runs true.instructionlist
.
If condition
evalutes to FALSE, then IFELSE runs false.instructionlist
.
It is an error if condition
does not evaluate to either TRUE or FALSE.
; simple examples IFELSE 1=1 [PRINT [Yes it is true]] [PRINT [No it is false]]
Yes it is trueIFELSE 1=0 [PRINT [Yes it is true]] [PRINT [No it is false]]
No it is false; example where IFELSE outputs a value TO MAX :a :b OUTPUT IFELSE :a > :b [:a] [:b] END SHOW MAX 1 2
2