Control statements
Control statement | Syntax |
| tell | tell referenceToObject to statement |
| | tell referenceToObject [ statement ]... end [ tell ] |
| if | if Boolean then statement |
| | if Boolean [ then ] [ statement ]... [ else if Boolean [ then ] [ statement ]...]... [ else [ statement ]...] end [ if ] |
| repeat | repeat [ statement ]... end [ repeat ] |
| | repeat integer [ times ] [ statement ]... end [ repeat ] |
| | repeat while Boolean [ statement ]... end [ repeat ] |
| | repeat until Boolean [ statement ]... end [ repeat ] |
| | repeat with variable from integer to integer [ by integer ] [ statement ]... end [ repeat ] |
| | repeat with variable in list [ statement ]... end [ repeat ] |
| exit | exit |
| |
| try | try [ statement ]... on error � [ errorMessageVariable] � [ number errorNumberVariable] � [ from offendingObjectVariable ] � [ partial result resultListVariable] � [ to expectedTypeVariable ] [ global variable [, variable]...] [ local variable [, variable]...] [ statement ]... end [ error | try ] |
| considering | considering attribute [, attribute ... and attribute ] ÿ [ but ignoring attribute [, attribute ... and attribute ] ] [ statement ]... end considering |
| ignoring | ignoring attribute [, attribute ... and attribute ] ÿ [ but considering attribute [, attribute ... and attribute ] ] [ statement ]... end ignoring |
| with timeout | with timeout [ of ] integer second[s] [ statement ]... end [ timeout ] |
| with transaction | with transaction [ session ] [ statement ]... end [ transaction ] |