(89) :when(condition, ifTrue[, ifFalse[, undefined]])

This exaluates a condition. If the condition is true, ifTrue is returned. If the condition is false, ifFalse is returned. If condition is indeterminate, undefined is returned.


:DelVar x
:when(y=1,0)      :"returns 0"
:when(y=0,0)      :"does not evaluate"
:when(x=0,0)      :"does not evaluate"
:when(y=1,0,2)    :"returns 0"
:when(y=0,0,2)    :"returns 2"
:when(x=0,0,2)    :"does not evaluate"
:when(y=1,0,2,4)  :"returns 0"
:when(y=0,0,2,4)  :"returns 2"
:when(x=0,0,2,4)  :"returns 4

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.