Loops/While: Difference between revisions
Content added Content deleted
(Added DWScript + fixed Delphi snippet) |
No edit summary |
||
Line 436: | Line 436: | ||
1024 [0 >] [dup putln 2 /] while.</lang> |
1024 [0 >] [dup putln 2 /] while.</lang> |
||
=={{header|Liberty BASIC}}== |
|||
All integers are changed to floats if an operation creates a non-integer result. |
|||
Without using int() the program keeps going until erroring because accuracy was lost. |
|||
<lang lb> |
|||
i = 1024 |
|||
while i > 0 |
|||
print i |
|||
i = int( i / 2) |
|||
wend |
|||
end |
|||
</lang> |
|||
=={{header|Lisaac}}== |
=={{header|Lisaac}}== |
||
<lang Lisaac>+ i : INTEGER; |
<lang Lisaac>+ i : INTEGER; |