ldmud/doc/LPC/comments
Lars f84a2fc7a0 Initial import from PRCS.
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@4 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
2005-06-21 01:46:13 +00:00

44 lines
1.3 KiB
Text

NAME
comments
SYNTAX
/* block comment text */
// line comment text <end of line>
DESCRIPTION
Comments are used to stored arbitrary text in the LPC program
source. It is a good idea if some if this text explains the
deeper intentions behind the actual LPC statements.
There are block comments and line comments.
Block comments start with a '/*' and end with a '*/'. They cannot
be nested, so
/* this /* is */ illegal */
will treat '/* this /* is */' as the comment.
Line comments start with '//' and continue until the unescaped(!)
end of the line (as in the new C standard).
It is not possible to next block and line comments within
each other. Meaning: '//' within /* ... */ has no special meaning,
neither does '/*' or '*/' have after a //.
EXAMPLES
/* Simple block comment */
/* Block comments can
span several lines */
// Simple line comment
// Line comments can \
span several lines, too!
//#define LONG_MACRO The unique behaviour \
or line comments regarding the end of line \
can be used for example to comment out a \
large macro with just to keystrokes.