Anonymous user
Loops/Continue: Difference between revisions
→{{header|Picat}}: Adding Picat
(→{{header|Picat}}: Adding Picat) |
|||
Line 1,777:
echo ', ';
}</lang>
=={{header|Picat}}==
Picat doesn't have a continue statement. So I just use a conditional that ends the body of the predicate.
{{trans|Prolog}}
{{works with|Picat}}
<lang Picat>
main =>
foreach (I in 1..10)
printf("%d", I),
if (I mod 5 == 0) then
nl
else
printf(", ")
end,
end.
</lang>
{{out}}
<pre>
1, 2, 3, 4, 5
6, 7, 8, 9, 10
</pre>
=={{header|PicoLisp}}==
|