Programmer Guide/Command Reference/CONTINUE: Difference between revisions

From STX Wiki
Jump to navigationJump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}__NOTOC__
The <code>CONTINUE</code> command skips the rest of the body of a loop, effectively continuing execution with the next iteration of the respective loop(see <code>[[Programmer Guide/Command Reference/DO|DO]]</code>, <code>[[Programmer_Guide/Command_Reference/WHILE|WHILE]]</code>, <code>[[Programmer_Guide/Command_Reference/FOREVER|FOREVER]]</code>, and <code>[[Programmer_Guide/Command_Reference/FOR|FOR]]</code>). Obviously, this command may only be used inside a loop.
The <code>CONTINUE</code> command skips the rest of the body of a loop, effectively continuing execution with the next iteration of the respective loop. Obviously, this command may only be used inside a loop.
==Usage==
CONTINUE


=== Example ===
==Result==
  for #i := 0 to $#i < $#t[] step #i := int $#i + 1
The <code>CONTINUE</code> command does not generate a return value. Neither does it change the variable <var>RC</var>.
     if '$#t[$#i,ID]' <= '100' continue
 
==See also==
[[Programmer_Guide/Introduction#Control_Commands|control commands]], [[../BREAK|BREAK]], [[../DO|DO]], [[../WHILE|WHILE]], [[../FOR|FOR]], [[../FOREVER|FOREVER]], [[../END|END]]
<!-- C.G. 14.3.2011 -->
<!-- A.N. 27.4.2011 -->
==Example==
  for #i := 0 to $#i < $#table[] step #i := int $#i + 1
     if '$#table[$#i,ID]' <= '100' continue
     // do something with all IDs above 100
     // do something with all IDs above 100
  end
  end
=== See also ===
<code>[[Programmer_Guide/Command_Reference/BREAK|BREAK]]</code> command
<!-- C.G. 14.3.2011 -->

Latest revision as of 15:39, 24 April 2014

The CONTINUE command skips the rest of the body of a loop, effectively continuing execution with the next iteration of the respective loop. Obviously, this command may only be used inside a loop.

Usage

CONTINUE

Result

The CONTINUE command does not generate a return value. Neither does it change the variable RC.

See also

control commands, BREAK, DO, WHILE, FOR, FOREVER, END

Example

for #i := 0 to $#i < $#table[] step #i := int $#i + 1
    if '$#table[$#i,ID]' <= '100' continue
    // do something with all IDs above 100
end

Navigation menu

Personal tools