While Loop

From Sputnik Wiki
Revision as of 09:04, 8 November 2011 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

While...WEnd

Description

Loop based on an expression.

While <expression>
    statements
    ...
WEnd

Parameters

expression

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

Remarks

While...WEnd 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 non-zero number as the expression such as "While True"

Example

While $i < 20
	println( "Value is: " . $i )
	$i++
WEnd
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox