![]() Chapter Contents |
![]() Previous |
![]() Next |
| Comment |
| Valid: | anywhere |
| Category: | Log Control |
| Syntax | |
| Arguments | |
| Details | |
| Examples |
Syntax |
|
*message;
or |
| /*message*/ |
| Range: | These comments can be any length. |
| Restriction: | These comments must be written as separate statements. |
| Restriction: | These comments cannot contain internal semicolons. |
| Range: | These comments can be any length. |
| Restriction: | This type of comment cannot be nested. |
| Tip: | These comments can contain semicolons. |
| Tip: | You can write these comments within statements or anywhere a single blank can appear. |
| Details |
You can use the comment statement anywhere in a SAS program to document the purpose of the program, explain unusual segments of the program, or describe steps in a complex program or calculation. SAS ignores text in comment statements during processing.
![[cautionend]](../common/images/cautend.gif)
| Examples |
These examples illustrate the two types of comments:
*This code finds the number in the BY group;
*---------------------------------------* | This uses one comment statement | | to draw a box. | *---------------------------------------*;
input @1 name $20. /* last name */
@200 test 8. /* score test */
@50 age 3.; /* customer age */
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.