Anonymous user
Loops/While: Difference between revisions
added J
m (Added ColdFusion implementation.) |
(added J) |
||
Line 71:
i = i / 2
END DO
=={{header|J}}==
J is array-oriented, so there is very little need for loops. For example, one could satisfy this task this way:
,.<.@-:^:*^:a:1024
J does support loops for those times they can't be avoided (just like many languages support gotos for those time they can't be avoided).
3 : 'while. 0 < y do. y =. <. -: y 1!:2 ]2 end.' 1024
Though it's rare to see J code like this.
=={{header|Java}}==
|