Loops/While: Difference between revisions

Content added Content deleted
No edit summary
(Modula-3)
Line 180: Line 180:
Invoking it
Invoking it
|make -f while.mk MAX=1024
|make -f while.mk MAX=1024

=={{header|Modula-3}}==
The usual module code and imports are omitted.
<pre>
PROCEDURE DivBy2() =
VAR i: INTEGER := 1024;
BEGIN
WHILE i > 0 DO
IO.PutInt(i);
IO.Put("\n");
i := i DIV 2;
END;
END DivBy2;
</pre>


=={{header|Oberon-2}}==
=={{header|Oberon-2}}==
The usual module code and imports are ommited.
<pre>
<pre>
PROCEDURE DivBy2*();
PROCEDURE DivBy2*();