Programmer Guide/Command Reference/GOTO: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(Created page with '<code>GOTO <var>label</var> [<var>default_label</var>]</code> :Continue macro execution at the label <var>label</var>. With the argument <var>default_label</var> a second label c…')
 
No edit summary
Line 1: Line 1:
<code>GOTO <var>label</var> [<var>default_label</var>]</code>
<code>GOTO <var>label</var> [<var>default_label</var>]</code>
:Continue macro execution at the label <var>label</var>. With the argument <var>default_label</var> a second label can be specified which is used as the target if label is not defined. The <code>GOTO</code> command with a variable label is often used to implement a switch-like control structure. In this case, default_label is the name of the default switch-clause. If label (and default_label) is not defined, an error is generated and the macro is terminated.
Continue macro execution at the label <var>label</var>. With the argument <var>default_label</var> a second label can be specified which is used as the target should the primary target, <code>label</code>, be undefined.
 
Often, the <code>GOTO</code> command is used with a variable label to implement a switch-like control structure. In this case, <var>default_label</var> is the name of the default switch-clause.
 
If both <var>label</var>, and <var>default_label,</var> are undefined, an error is generated and macro execution terminates.
<!-- C.G. 31.3.2011 -->

Revision as of 12:18, 31 March 2011

GOTO label [default_label] Continue macro execution at the label label. With the argument default_label a second label can be specified which is used as the target should the primary target, label, be undefined.

Often, the GOTO command is used with a variable label to implement a switch-like control structure. In this case, default_label is the name of the default switch-clause.

If both label, and default_label, are undefined, an error is generated and macro execution terminates.

Navigation menu

Personal tools