Debugging 注释掉测试代码的部分

Debugging 注释掉测试代码的部分,debugging,comments,sas,Debugging,Comments,Sas,为了调试的目的,我想注释掉SAS程序第26行之后的所有内容endsas终止一切,包括SAS程序,但我希望该程序保留并检查结果。请告知步骤。下面是@RosaryGuy的好答案: A couple of thoughts: 1) Hold down 'control key and forward slash to comment out line by line. 2) Put code between %macro somename and %Mend Do not use endsas u

为了调试的目的,我想注释掉SAS程序第26行之后的所有内容
endsas
终止一切,包括SAS程序,但我希望该程序保留并检查结果。请告知步骤。

下面是@RosaryGuy的好答案:

A couple of thoughts:

1) Hold down 'control key and forward slash to comment out line by line.
2) Put code between %macro somename and %Mend

Do not use endsas unless you want to instantly shut down your session.

I hope this helps.
*星号和分号之间的任何内容都将被注释掉

/*斜杠星号和星号斜杠之间的任何内容都将被注释掉*/

%macro ignore; This whole section, between '%macro ignore;' and '%mend;', including any comments of any kind, any other macro calls, and any syntactically incorrect code etc. will be compiled at execution time but never run. You should use this to 'comment out' large sections of code that may already have comments in them. %mend; %宏观忽略; 整个节,在“%macro ignore;”之间和“%mend;”, 包括任何类型的注释,任何其他宏调用, 任何语法错误的代码等都将被编译 在执行时,但从不运行。你应该用这个来 “注释掉”可能已经存在的大部分代码 他们的评论。
%修补 下面是@RosaryGuy的好答案:

*星号和分号之间的任何内容都将被注释掉

/*斜杠星号和星号斜杠之间的任何内容都将被注释掉*/

%macro ignore; This whole section, between '%macro ignore;' and '%mend;', including any comments of any kind, any other macro calls, and any syntactically incorrect code etc. will be compiled at execution time but never run. You should use this to 'comment out' large sections of code that may already have comments in them. %mend; %宏观忽略; 整个节,在“%macro ignore;”之间和“%mend;”, 包括任何类型的注释,任何其他宏调用, 任何语法错误的代码等都将被编译 在执行时,但从不运行。你应该用这个来 “注释掉”可能已经存在的大部分代码 他们的评论。 %修补 对于这个稍有不同的问题()的公认答案(由cmjohns提供)包含了几乎所有可能的注释代码的方法

这包括通过以下方式进行:

  • 注释
    -两种
  • %include
    语句
  • %macro
    语句
  • noexec
    cancel
    语句
  • options obs=0 noreplace-链接的PDF中未包含此内容,但问题中已包含此内容
它还包含上述每种方法的便捷提示和快捷方式

有关详细信息,请参见链接至

对于这个稍有不同的问题()的公认答案(由cmjohns提供)包含了关于注释代码的所有可能方法

这包括通过以下方式进行:

  • 注释
    -两种
  • %include
    语句
  • %macro
    语句
  • noexec
    cancel
    语句
  • options obs=0 noreplace-链接的PDF中未包含此内容,但问题中已包含此内容
它还包含上述每种方法的便捷提示和快捷方式


详细信息在

的链接中。如果您有不平衡的引号,这将不起作用,因为%mend将作为带引号字符串的一部分读取,而不是结束ignore宏。例如,此注释将破坏ignore宏(因为此注释中有奇数个撇号,被视为不平衡单引号)。如果您有不平衡的引号,这将不起作用,因为%mend将作为带引号字符串的一部分读取,而不是结束ignore宏。例如,这条注释会打断ignore宏(因为在这条注释中有奇数个撇号,被算作不平衡单引号)。