【问题标题】:Continue out of FORALL loop in Chapel继续在教堂的 FORALL 循环之外
【发布时间】:2017-10-20 15:59:53
【问题描述】:

当你把它全部写成这样时,你真的看到了 FORTRAN 的传统。无论如何,我无法让forall continue 语法正确。

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);
}

在 Chapel 中使用 forall 时如何正确“跳出这个循环”?

== 编辑 ==

错误是

 error: break or continue is not in a loop

【问题讨论】:

  • 这是一个可怕的错误信息!如果您针对它提出 GitHub 问题,我们将不胜感激。
  • 分布式基础设施重新发出本地语言环境发出的中断信号确实是一个语言挑战。

标签: chapel forall


【解决方案1】:

除了误导性错误消息之外,我认为您只是遇到了当前版本的 Chapel (1.16.0) 中未实现的功能。即,我相信这应该有效。让我们选择您在上面 cmets 部分中提出的问题以继续讨论。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-25
    • 1970-01-01
    • 2021-06-16
    • 2011-08-19
    相关资源
    最近更新 更多