while Tag

Format: <while Expression> heitml </while>

Purpose: The while tag is used to program a loop.

First, the Expression is evaluated. The result must be of type Boolean. While the expression evaluates to true, the actions defined in the body of the loop are executed.

An alternative to the while loop is the for loop.

Caution! Before running a program that uses while loops, first check that you did not program an endless loop.

See Also: for, forin.

Example:

input:resulting output:
<let i = 0;
 while i &le; 10;
   ? i * 2;
   if i &lt; 10>,</if;
   i = i + 1;
/while>
0,2,4,6,8,10,12,14,16,18,20

Note: The while Tag is Case Sensitive, which means that heitml will not recognize it if you use capital letters (e.g. <WHILE Expression>).

This page was dynamically generated by the web application development tool RADpage of H.E.I.
© 1996-2013 H.E.I. All Rights Reserved.