Loops/While: Difference between revisions

(fix typo)
Line 217:
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).
 
<lang j>3monad : 0 ]define 1024
while. 0 < y do.
while. 0 <smoutput y do.
y =. <. -: y 1!:2 ] 2
end.
y =. <. -: y
i.0 end.0
i. 0 0
)</lang>
 
Though it's rare to see J code like this.
 
=={{header|Java}}==
892

edits