Chapter Contents

Previous

Next
Comment

Comment



Documents the purpose of the statement or program

Valid: anywhere
Category: Log Control


Syntax
Arguments
Details
Examples

Syntax

*message;
or
/*message*/


Arguments

*message;
specifies the text that explains or documents the statement or program.
Range: These comments can be any length.
Restriction: These comments must be written as separate statements.
Restriction: These comments cannot contain internal semicolons.

/*message*/
specifies the text that explains or documents the statement or program.
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.

CAUTION:
Avoid placing the /* comment symbols in columns 1 and 2. In some operating environments, SAS may interpret a /* in columns 1 and 2 as a request to end the SAS program or session. For details, see the SAS documentation for your operating environment.  [cautionend]


Examples

These examples illustrate the two types of comments:


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.