Until Loop

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "= Until...UEnd = === Description === Loop based on an expression. <pre> Until <expression> statements ... UEnd </pre> === Parameters === ==== expression ==== If th...")
 
(Remarks)
Line 20: Line 20:
 
=== Remarks ===
 
=== Remarks ===
  
Until...UEnd statements may be nested.
+
Until statements may be nested.
  
 
The expression is tested before the loop is executed so the loop will be executed zero or more times.
 
The expression is tested before the loop is executed so the loop will be executed zero or more times.
  
To create an infinite loop, you can use a zero number as the expression such as "Until False"
+
To create an infinite loop, you can use a zero number as the expression such as "Until ( False )"
 +
 
 +
The expression can contain the boolean operators of &&, ||, ! as well as the logical operators <, <=, >, >=, ==, !=, <>, eq, eqi, neq and neqi as needed grouped with parentheses as needed.
  
 
=== Example ===
 
=== Example ===

Revision as of 16:51, 18 November 2011

Contents

Until...UEnd

Description

Loop based on an expression.

Until <expression>
    statements
    ...
UEnd

Parameters

expression

If the expression is false the following statements up to the UEnd statement are executed. This loop continues until the expression is true.

Remarks

Until statements may be nested.

The expression is tested before the loop is executed so the loop will be executed zero or more times.

To create an infinite loop, you can use a zero number as the expression such as "Until ( False )"

The expression can contain the boolean operators of &&, ||, ! as well as the logical operators <, <=, >, >=, ==, !=, <>, eq, eqi, neq and neqi as needed grouped with parentheses as needed.

Example

$i = 0
Until $i > 20
	println( "Value is: " . $i )
	$i++
UEnd
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox