Loops/While: Difference between revisions

Content added Content deleted
(→‎{{header|Oz}}: alternative while-loop)
Line 382: Line 382:
{Show I}
{Show I}
end</lang>
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}}==
=={{header|Pascal}}==