I tested this still happen in j602 beta

foo1=: 3 : 0
for_i. i.5 do.
  if. 2=i do. continue. end.
  1!:2&2 i
end.
''
)

foo2=: 3 : 0
for_i. i.5 do.
  select. i
  case. 2 do. continue.
  end.
  1!:2&2 i
end.
''
)

   foo1''
0
1
3
4

   foo2''
0
1

continue behaves as it were break inside a select-case structure. As I understood, continue will affect the inner most loop, but switch-case statement is not a loop structure. Is this a bug or an intended behavior?

--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to