Loops/While: Difference between revisions

(→‎{{header|Ruby}}: begin-end-while is actually do-while loop)
(→‎{{header|Ruby}}: added until)
Line 505:
<lang ruby>i = 1024
puts i or i /= 2 while i > 0</lang>
 
<code>until ''condition''</code> is equivalent to <code>while not ''condition''</code>.
 
<lang ruby>i = 1024
until i <= 0 do
puts i
i /= 2
end</lang>
 
=={{header|Scheme}}==
Anonymous user