英文:
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<+⌿⍵
?
答案1
得分: 2
没有IDE(或RIDE)支持这一点,但通过对源代码进行简单的更改,您可以实现这个效果。
在tradfn中:
:如果 0<+⌿var
🔴 :结束
在dfn中:
0<+⌿⍵:{
🔴 }⍬
如果条件不成立,我们将跳过本来会停止执行的那一行。
英文:
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<+⌿var
🔴 :Endif
In a dfn:
0<+⌿⍵:{
🔴 }⍬
If the condition doesn't hold, we skip the line that would have stopped execution.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论