if expression
actions
elif expression
actions
else
actions
endif
The if statement allows the control flow through a script to be sensitive to conditions inside the application as it is being run. For each if there must be a matching endif. If necessary the statement can include optional alternatives (elif) and a default catch-all else condition.
in my_shell
if !my_option_menu->menuHistory:default_option
message FAIL: bad setting for my_option_menu
message Setting should be:
printres my_option_menu->menuHistory:default_option
else
message setting ok for my_option_menu
endif
See also: