2

When you write it all caps like that, you really see the FORTRAN heritage. Anyway, I can't get the forall continue syntax correct.

var ids = {1,2,3,5,7,11};

forall id in ids {
  if id == 5 then writeln("High Five!!");
  if id == 7 then continue;
  writeln(id);
}

How does one properly "skip out of this loop" when using forall in Chapel?

== EDIT ==

Error is

 error: break or continue is not in a loop
Brian Dolan
  • 3,086
  • 2
  • 24
  • 35

1 Answers1

2

Beyond the misleading error message, I think you've simply run into an unimplemented feature in the current version of Chapel (1.16.0). I.e., I believe that this ought to work. Let's co-opt the issue you filed in the comments section above to continue the discussion.

Brad
  • 3,839
  • 7
  • 25