在Dyalog RIDE中设置条件断点。

huangapple go评论66阅读模式
英文:

Setting a conditional breakpoint in Dyalog RIDE

问题

Dyalog RIDE中,我知道如何设置断点,以在APL源代码中的特定行上停止执行。是否有一种方法可以使断点有条件,以便只有在满足特定条件集合的情况下才能停在某一行,例如0 < +⌿⍵

英文:

In Dyalog RIDE, I know how to set breakpoints that will halt execution on specific lines in the APL source. Is there a way to make a breakpoint conditional so I can stop at a line only if a particular set of conditions are met, e.g. 0&lt;+⌿⍵?

答案1

得分: 2

没有IDE(或RIDE)支持这一点,但通过对源代码进行简单的更改,您可以实现这个效果。

在tradfn中:

    :如果 0<+var
&#128308;  :结束

在dfn中:

    0<+⍵:{
&#128308;  }⍬

如果条件不成立,我们将跳过本来会停止执行的那一行。

英文:

There's no IDE (or RIDE) support for this, but with a simple change to the source code, you can achieve the effect.

In a tradfn:

    :If 0&lt;+var
&#128308;  :Endif

In a dfn:

    0&lt;+⍵:{
&#128308;  }⍬

If the condition doesn't hold, we skip the line that would have stopped execution.

huangapple
  • 本文由 发表于 2023年5月22日 17:21:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76304695.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定