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

Line Continuation

PPWIZARD can handle any length line (subject to any REXX interpreter limitations), however the editor you are using may have limitations or you just might want to format the line better. PPWIZARD allows you to specify that a line continues onto the next line. The two or more lines will be merged together.

You can continue long lines by placing the line continuation characters (' \' by default) at the end of a line that continues onto the next.

The #( command provides an alternative to the use of the line continuation characters and the #DefineRexx command provides a simpler way of formatting REXX code.

It is not valid for the last line of a file to contain the line continuation characters, all combined lines must come from the one input file.

This capability would be most useful for #define commands.

The "LineContinuation" option can be used to disable line continuation or to change the continuation character.

When you have a long #define statement that spans lines you can have any commands (such as #if, #elseif and #endif) within a continue block, however these commands themselves NEVER continue on following lines.

While line continuation is taking place blank or comment lines are treated no differently from any other lines (that is they are not completely ignored as would normally be the case). If a comment line is found while collecting continued lines it must contain line continuation characters if the continuation is to continue.

There are actually a number of line continuation types which make for an easier to read shorthand for other variations. All valid variations are listed below:

  1. -\
    All trailing whitespace is removed from this line before the next line is added.

  2. +\
    All trailing whitespace is removed from this line before a space and then the next line is added.

  3. \ (space + slash)
    All trailing whitespace is removed from this line before a single space and the next line is added.

  4. %\
    All trailing whitespace is removed from this line before a newline code and the next line is added.

If the line does not end in one of the above 2 character codes then the continuation character is ignored. Note that '+\' and ' \' currently serve the same purpose, in a future release you will probably be able to set the default continuation type for ' \'.

Note that line continuation does not occur when the #AsIs "ON" is used.

Example of #if Use Within Line Continuation

#define TheSame                                      \
        <P>Hi, my name is Dennis Bareis and I have   \
           been using OS/2 and developing for        \
        #if '<$AtWork>' = 'Y'                        \
           BNZ                                       \
        #elseif                                      \
           *WRONG INC*                               \
        #endif                                       \
        on and off since the original 1.0 version.

The above shows the creation of a multi-line macro. It is recommended (and in some cases required) that the definition be formatted as above, that is the line is continued by '\' after the macro name. All other line continuation can be as per your requirements (the above is simple but not ideal...).

Example - Good Formatting, Macro Use

<$MyMacro                         \
           Parm1=^a parameter^    \
           Parm2=^a parameter^    \
           Parm3=^a parameter^    \
>


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

[Top][Contents][Search][Prev]: Commenting[Next]: Quoted Text - $Text$


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am