PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Commands[Next]: #)
\ -> Commands -> #(

#(

This command provides a simple way to spread a long line of over many lines without the need for line continuation characters at the end of each line.

Basically you define a block, within this block all lines are combined (using the separator character(s) you chose). Note that if some lines within the block need different line separators, you can still use the normal line continuation characters for these lines! An alternative method is to nest this command where multiple separators are required.

It is recommended that you do not use this command to handle rexx code, use the #DefineRexx command instead.

Note that the restriction of on long imbedded ppwizard command mentioned in the line continuation section also applies here.

You can use this command to surround the definition of a macro, however the first line (The "#define[?|+]" command) must not end with a line continuation character. PPWIZARD will detect the definition and will ensure a space is used for the separator and not the "Separator" character sequence you defined.

This command can't itself be used in a macro! If you try to do this the most likely result is being told that ppwizard does not understand the '#)' command.

Syntax

[WhiteSpace]#(  [["]Separator["] [["]EndBlockMarker["]]]

If the Separator parameter is supplied it defines the zero or more characters that separate each line within the block. The default separator is a space unless the "PPWIZARD_DEFAULT_#(_SEPARATOR" macro exists.

If the EndBlockMarker parameter is supplied this determines the text that marks the end of the block, this can be any text and by default is "#)" (note that the current prefix is used). Lines are combined until this text is located (in this exact case).

This command used to be called "#OneLine" and you should replace all occurances.

EXAMPLE - Basic Demo

#( '<?NewLine>'
   Line 1
   Line 2
   #( ' ' '$$$'      ;;"nested" block (block ends at '$$$')
       This
       is
       Line
       3
   $$$
   This    \
   is Line \
   4
   Line 5
#)

EXAMPLE - Repeat Block

In a jetform JMD (Job Management Database) we needed to define 82 lines for each product (only a subset of this is shown in the example) so we defined this macro:

;--- Define the template for a "Product Summary" ---
#define ExpandMacro <${$#1}>
#( '<?NewLine>'
   #define ProductSummary
   <?Hash>===[ Product Summary ]========================================
   <?Hash>===    Product: {$Product}
   <?Hash>===        MDF: {$Mdf}
   <?Hash>=== Input Tray: {$InputTray}
   <?Hash>=== Defined at: Line <?InputComponentLine> of <?InputComponent>
   <?Hash>==============================================================
   !f {$Product}_F_1 RIGHTFAX """<$DirJfForms>\{$MDF}.mdf"" -afxon -aip2 -agvFAX_MESS=1" * 1 T SSPPGGET * * C *
   !f {$Product}_F_1 RIGHTFAX """<$DirJfForms>\{$MDF}.mdf"" -afxon -aip2 -agvFAX_MESS=1" * 1 T SSPPGSET * * C *
   ...
   ...
   !f {$Product}_P Optra """<$DirJfForms>\{$MDF}.mdf"" -afxon -aip1 -ati20<$ExpandMacro =^{$InputTray}^>" * 1 T SSPPGGET * * C *
   !f {$Product}_P Optra """<$DirJfForms>\{$MDF}.mdf"" -afxon -aip1 -ati20<$ExpandMacro =^{$InputTray}^>" * 1 T SSPPGSET * * C *
   <?Hash>
   <?Hash>
#)

;--- Define the input paper trays used ---
#define LIGHT   3
#define DARK    4

We then use the above macro:

<$ProductSummary  Product="PROD19"   MDF="PSMORT"     InputTray="DARK">
...
<$ProductSummary  Product="PROD40"   MDF="PSGENERAL"  InputTray="LIGHT">
...
<$ProductSummary  Product="PROD73"   MDF="PSGENERAL"  InputTray="LIGHT">


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

[Top][Contents][Search][Prev]: Commands[Next]: #)


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday February 28 2016 at 2:05pm