Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
The single-statement if
structure tests for a condition and executes one statement if the condition is true. You use the optional else if
or else
form to run other blocks of code in case the condition following if
is false.
Because each part of a simple if
structure is limited to one statement, you don't need an end if
statement.
You can send a one-line if
structure from the Message box.
Any expression that evaluates to the HyperTalk and AppleScript constants true
or false
.
For example:
Any return-separated list of built-in commands, user-defined handlers, or keywords that are part of a message or function handler.