Loops/While: Difference between revisions

→‎{{header|Oz}}: alternative while-loop
(→‎{{header|Oz}}: alternative while-loop)
Line 382:
{Show I}
end</lang>
 
Alternatively, we can use the <code>while</code> feature of the for-loop with a mutable variable:
<lang oz>declare
I = {NewCell 1024}
in
for while:@I > 0 do
{Show @I}
I := @I div 2
end</lang>
 
=={{header|Pascal}}==
Anonymous user