Loops/While: Difference between revisions

Content deleted Content added
m Semi-automated edit: Deleted "Bash" (redundant with "UNIX Shell")
m →‎Icon and Unicon: header simplification
Line 273: Line 273:
modifyIORef r (`div` 2))</lang>
modifyIORef r (`div` 2))</lang>


== Icon and Unicon ==
=={{header|Icon}} and {{header|Unicon}}==
==={{header|Icon}}===
<lang icon>procedure main()
<lang icon>procedure main()
local i
local i
Line 280: Line 279:
while write(0 < (i := i / 2))
while write(0 < (i := i / 2))
end</lang>
end</lang>

==={{header|Unicon}}===
This Icon solution works in Unicon.


=={{header|Inform 7}}==
=={{header|Inform 7}}==