PPWIZARD Manual
[Bottom][Contents][Search][Prev]: Special MACRO Replacement [Next]: Multi Line Macros With Logic

Special MACRO PARAMETER Replacement "$$" Commands

The subject of macros is reasonably complex (but well worth learning) please ensure you have at least read the macro introduction before reading this section.

Within a macro's data, when referring to a parameter you can specify certain special commands (all begin with '$$'). These commands (there can be more than one) occur immediately preceeding the '}' character, available commands are:

Note that the quoting routines above do more than just make your code "prettier", without using these commands you have to decide on a quote character yourself and then a parameters value must never contain this character. These special commands won't solve all quoting issues (remember parameter processed left to right - imbedded parameters are not processed first) however they will make life much easier.

Lets make sure that parameters 2 and 3 in the following macro get translated to upper case:

    ;--- Define macro ---------
    #define  SimpleTest P1={$parm1}, P2={$parm2="parm1_default" $$upper}, P3={$parm3 $$upper $$DSQ}
    
    ;--- Expand macro ---------
    <$SimpleTest Parm1='value1' Parm2='value2' Parm3='value3'>
    


[Top][Contents][Search][Prev]: Special MACRO Replacement [Next]: Multi Line Macros With Logic

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Tuesday January 02 2001 at 7:37am