Equinox Online Help - Language Reference - A to Z
Goto |
|
---|---|
Applies to | |
Syntax | Goto LabelName |
Action | [Statement] Passes control to a block. |
Scope | Usable anywhere. |
Notes | Control passes to the block specified by LabelName. LabelName is defined in Block statement. There are restrictions on the use of this statement. If the statement is inside a block, you cannot pass control out of that block. Similarly you cannot pass control into a block. The Goto statement and the block must be at the same structure level. Structure levels are defined by the For, If, While, Repeat, Block, Switch, Procedure and Subtable statements. |
Category | Flow Control |
See Also | Block_EndBlock, BreakPressed, Continue, Execute, EnableInput, Exit, For...Next, If_Then, Repeat_Until, Return, Sleep, Subtable, Switch, While_EndWhile |
Example | This example shows how an insurance claim might be evaluated. Such systems have complicated inter-dependent conditions which must eventually lead to one of several possible actions. if ClaimType = "HOUSE" thenif TotalInsured < ClaimValue thenelse if ClaimValue > 5000 thenGoto HivalueClaimelseGoto HouseClaimend ifGoto HivalueClaimelseGoto DefaultClaimProcedureend if |