Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Comments z/OS TSO/E REXX Reference SA32-0972-00 |
|
A comment is a sequence of characters (on one or more lines) delimited
by /* and */. Within these delimiters
any characters are allowed. Comments can contain other comments, as
long as each begins and ends with the necessary delimiters. They are
called nested comments. Comments can be anywhere and can be
of any length. They have no effect on the program, but they do act
as separators. (Two tokens with only a comment in between are not
treated as a single token.)
Take special care when commenting out lines of code containing /* or */ as
part of a literal string. Consider the following program segment:
To comment out lines 2 and 3, the following change would be incorrect:
This is incorrect because the language processor would interpret the /* that is part of the literal string /*123 as the start of a nested comment. It would not process the rest of the program because it would be looking for a matching comment end (*/). You can avoid this type of problem by using concatenation for literal
strings containing /* or */; line
2 would be:
You could comment out lines 2 and 3 correctly as follows:
For information about Double-Byte Character Set characters, see Double-byte character set (DBCS) support and the OPTIONS instruction in topicOPTIONS. |
Copyright IBM Corporation 1990, 2014
|