Programmer Guide/Command Reference/FOREVER: Difference between revisions
From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import) |
|||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
The <code>FOREVER</code>, or <code>DO FOREVER</code> statement starts a, potentially infinite, loop. The commands between <code>FOREVER</code> or <code>DO FOREVER</code> and the corresponding <code>[[Programmer_Guide/Command_Reference/END|END]]</code> statement are being executed forever, or until execution of the loop gets interrupted by other means, e.g. by S_TOOLS-STx crashing, a <code>[[Programmer Guide/Command Reference/BREAK|BREAK]]</code> statement being encountered, or an <code>[[Programmer Guide/Command Reference/EXIT|EXIT]]</code>, or a [[Programmer Guide/Command Reference/GOTO|GOTO]] statement being executed. | |||
FOREVER | |||
<code> | or | ||
DO FOREVER | |||
Cave: If you do ''not'' use a <code>[[Programmer Guide/Command Reference/BREAK|BREAK]]</code>,<code>EXIT</code>, or [[Programmer Guide/Command Reference/GOTO|GOTO]] command for interrupting the loop, it may run for a really long time. | |||
Revision as of 19:23, 23 March 2011
The FOREVER
, or DO FOREVER
statement starts a, potentially infinite, loop. The commands between FOREVER
or DO FOREVER
and the corresponding END
statement are being executed forever, or until execution of the loop gets interrupted by other means, e.g. by S_TOOLS-STx crashing, a BREAK
statement being encountered, or an EXIT
, or a GOTO statement being executed.
FOREVER
or
DO FOREVER
Cave: If you do not use a BREAK
,EXIT
, or GOTO command for interrupting the loop, it may run for a really long time.