PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: $$ASIS[Next]: $$DEL:Delimiter
\ -> Macros -> Macro Transformations -> $$C2X

$$C2X

This is a transformation that can be applied to the substitution of content for both macros and macro parameters.

This can be used as an easy way to create a simple case specific identifier for a value ("AB" would be converted to "4142").

In this "test" example we want to handle the parameter in a case dependant way:

#(
    #define DefineIT
    #define XXXX.{$#1 $$c2x}   Something
#)
#(
    #define TestIT

    #ifdef XXXX.{$#1 $$c2x}
       #info "{$#1} - DEFINED         - C2x={$#1 $$c2x}"
    #elseif
       #info "{$#1} - not DEFINED     - C2x={$#1 $$c2x}"
    #endif
#)

-----------------------------
<$DefineIt "AbCd">
<$TestIt   "aBcD">
<$TestIt   "AbCd">
<$TestIt   "abcd">
<$TestIt   "ABCD">


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

[Top][Contents][Search][Prev]: $$ASIS[Next]: $$DEL:Delimiter


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