Loops/While: Difference between revisions

Added Oz example.
(Add Lua implementation)
(Added Oz example.)
Line 368:
 
The usage of the type int32 is not convenient, since the math is done floating point, then rounding to integer, so that 1/2 will be always 1 and never 0.
 
=={{header|Oz}}==
Oz' for-loop can be used in a C-like manner:
<lang oz>for I in 1024; I>0; I div 2 do
{Show I}
end</lang>
 
=={{header|Pascal}}==
Anonymous user