Is it possible to have a GO script with a conditional based on the value of an argument?
Also relevant are the release notes on the IF-THEN-ELSE structure
The same approach that works on arguments also applies to symbols.
test.jnl
:
if $1"false|yes>true|*>false" then say "The user told me to do it" else say "The user told me not to do it" endifThe first "false" is the default value if no argument is supplied. "yes" translates to "true", all else ("*") translates to "false".
Used as follows:
yes? canc mode verify yes? go test yes The user told me to do it yes? go test no The user told me not to do it yes? go test The user told me not to do it
Last modified: Apr 22, 2004