Jump to content

Loops/While: Difference between revisions

No edit summary
Line 2,414:
$i >>= 1;
}</lang>
 
=={{header|Picat}}==
While loop
<lang Picat>go =>
N = 1024,
while (N > 0)
println(N),
N := N // 2
end.</lang>
 
Recursion
{{trans|Prolog}}
<lang Picat>go2 =>
while_loop(1024).
 
while_loop(0) => true.
while_loop(N) =>
println(N),
while_loop(N//2).</lang>
 
=={{header|PicoLisp}}==
495

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.