if/else/endif
The
The function of // create a new boolean value, and set it to true bool b set b true // test value of 'b', and echo value to event log if b echo "b is true!" else echo "b is false!" endif The output of which is: b is true! Closure and nesting
Each // create a new string value, and use it to compare in if/else chain
string s
set s "goodbye"
// test value of 's', and reply accordingly
if <zs:not <zs:strcmp s "hello">>
echo "Hello to you too!"
else
if <zs:not <zs:strcmp s "goodbye">> // note if is nested inside else
echo "Farewell!"
endif
endif
The output of which is: Farewell! Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|