PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: White Space[Next]: Line Continuation
\ -> The Source Code -> Commenting

Line Comments

By default the commenting character is ';'. If a line begins with this character then it is ignored.

The line comment character can be modified with the LineComment option or for the odd one of two characters starting a line you can use the "<?SemiColon>" code if required.

InLine Comments

If the line contains the line comment character doubled up (as in ;;) then everything after the last occurance of this string is considered to be an inline comment and is removed.

You could add ';;' to the end of a line so that an earlier occurance and everything following does not get removed. You can also use the "<?SemiColon>" code if required.

Note that if the line being dropped is in the middle of a set of continued lines then the line continuation characters at the end (or not at the end) of the dropped line are not ignored.

Note that a line starting with ";;" is not treated as a line comment but an inline comment, this does not usually make any difference however it will pass through a blank line if you are using the "LeaveBlankLines" option!

Commenting Blocks of Lines

The easiest way to comment out multiple lines at one time is to use the "#ifdef" command to check for a name that you will ensure never exists, such as in the following example:

;--- This is a line comment ---
#define Highlight <B>{$Text}</B>   ;;Comment here

#ifdef xxxx
1st line commented out ;;Inline Comment here
2nd line commented out
3rd line commented out
#endif

Another line line ;;<-Want this    ;;This will be removed

Note that if instead of "xxxx" you used something like "MY_DEBUG" you could then use /define to define this when you wanted to enable debugging and you could then selectively output "debug" information.


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: White Space[Next]: Line Continuation


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Saturday May 28 2022 at 2:55pm