Hello all,
I have trouble with adding comments by using an asterisk at the beginning and at the end of the comment.
before the comment, I enter /* and after the comment, I enter */. Most of the time, it works fine, however, sometimes it doesn't work (I enter */ at the end of the comment and the following code is still colored in green).
Does anyone had this trouble and know how to fix it?
Thanks in advance,
Lior
If your editor has the coloring wrong, you can often fix it with a * comment, e.g.:
* fix syntax coloring ;
@lioradam wrote:
Hello all,
I have trouble with adding comments by using an asterisk at the beginning and at the end of the comment.
before the comment, I enter /* and after the comment, I enter */. Most of the time, it works fine, however, sometimes it doesn't work (I enter */ at the end of the comment and the following code is still colored in green).
Does anyone had this trouble and know how to fix it?
Thanks in advance,
Lior
Coloring is some feature of the editor you are using, not the SAS language itself. The editor does not really know the impact of all of the various SAS syntaxes, especially if you are using macro code at all.
To tell if your comments are entered correctly you need to run the code.
Block comments start with /* and end with */ and cannot be nested.
Statement comments start with * and end with a semi-colon (just like any other SAS statement).
Macro statement comments start with %* and end with a semi-colon (just like any other macro statement).
If your editor has the coloring wrong, you can often fix it with a * comment, e.g.:
* fix syntax coloring ;
Thank you,
Lior
Thank you!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.