- This wiki is out of date, use the continuation of this wiki instead
Loops
From FenixWiki
(Difference between revisions)
| Revision as of 15:07, 1 May 2007 (edit) FCR (Talk | contribs) ← Previous diff |
Revision as of 15:16, 1 May 2007 (edit) (undo) FCR (Talk | contribs) Next diff → |
||
| Line 1: | Line 1: | ||
| - | + | [[category:reserved]] | |
| + | [[category:operator]] | ||
| + | == Definition == | ||
| + | '''LOOP''' | ||
| + | |||
| + | Loop is a reserved word used to create iterations in your code. The terminator for a loop is [[end]]. the statements between these words will get repeated indefinately. There are several types of loops: | ||
| + | |||
| + | * the normal [[loop]] | ||
| + | * [[while(<condition>)|while] loop (terminator: [[end]]) | ||
| + | * [[repeat]] loop (terminator: [[until(<condition>)|until]]) | ||
| + | * [[for([<initalization>];[<condition>];[<increment>])|for]] loop (terminator: [[end]]) | ||
| + | * [[from variable = value to value2|from] loop (terminator: [[end]]) | ||
| + | |||
| + | == Example == | ||
| <pre> | <pre> | ||
| - | + | Process loops() | |
| - | + | Begin | |
| - | + | ||
| + | End | ||
| </pre> | </pre> | ||
Revision as of 15:16, 1 May 2007
Definition
LOOP
Loop is a reserved word used to create iterations in your code. The terminator for a loop is end. the statements between these words will get repeated indefinately. There are several types of loops:
- the normal loop
- [[while(<condition>)|while] loop (terminator: end)
- repeat loop (terminator: [[until(<condition>)|until]])
- [[for([<initalization>];[<condition>];[<increment>])|for]] loop (terminator: end)
- [[from variable = value to value2|from] loop (terminator: end)
Example
Process loops() Begin End
