Difference between revisions of "CoCoA:While"
From ApCoCoAWiki
(pushing XML rev. 1.46, again) |
(No difference)
|
Latest revision as of 10:02, 24 October 2007
While
loop command
Description
The command sequence C is repeated until B evaluates to FALSE.
Example
N := 0; While N <= 5 Do PrintLn 2, <quotes>^</quotes>, N, <quotes> = </quotes>, 2^N; N := N+1; EndWhile; 2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 2^4 = 16 2^5 = 32 -------------------------------
Syntax
While B Do C EndWhile where B is a boolean expression and C is a sequence of commands.
<type>programming</type> <type>loops</type>