Skip to main content

Simple Conditions

The conditions within an If construct are expressions which evaluate to true or false.

In the simple case, the expression is a constant, variable, or function call. Expressions whose numeric interpretation evaluates to a non-zero value are true. Those which evaluate to zero are false.

Terminal


USER>if 0 {write "true"} 

USER>if 5 {write "true"} 
true
USER>set condition = "a"
 
USER>if condition {write "true"}
 
USER>set condition = "1000"
 
USER>if condition {write "true"}
true
USER>set condition = -2
 
USER>if condition {write "true"}
true
USER>if $zsqr(64) {write "true"}
true
USER>

FeedbackOpens in a new tab