我将“ if”块设置为可折叠,
我一直在像这样使用它们
如果(1 == 1,//注释abc
<可折叠代码块1>);
如果(1 == 1,//注释xyz
<可折叠代码块2>);
但是通常,第一个块会捕获后面的块并将它们折叠在一起。
该代码可以正常工作,但是有时很难找到代码,因此容易出错。
有解决这个问题的方法吗?
我遇到了相同的问题(使用JMP15.2.1)。
我设法重复了一次,但是我不确定这有多可靠:
1.开始于:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
2.删除);从第6行开始:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
3.在第5行上按Enter,然后添加新的if语句:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
if(
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
4.删除新的If(但离开);
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
从第3部分开始的图片:
如果是新的:

如果已删除,则为新功能(代码折叠方块有点奇怪):

之后重新打开脚本:

至少在这种情况下,如果从代码中间删除了某些内容,似乎代码折叠没有得到正确的更新。 对我来说,它通常通过重新启动JMP或只是关闭并重新打开脚本来解决。