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

#Unknown Commands

Normally ppwizard dies if you specify an invalid command. PPWIZARD allows you to extend the range of available commands if you wish.

One good reason why you might wish to do this is to create your own set of commands to integrate better with ppwizard, you don't wish to rely on a user specifying macros etc or you just feel the syntax is cleaner.

The first time ppwizard finds an unknown command it will look for a macro with the name UNKNOWN_HASH_COMMANDS. This macro should contain the rexx code to be executed.

The following rexx variables are significant:

Example

;--- Define Handler for new #commands ---------------------------------------
#DefineRexx 'UNKNOWN_HASH_COMMANDS'
            select
               /*++++++++++++++++++++++++++++++++++++++++++++++*/
               when HashCmd = HashPrefix || 'SET' then
               /*++++++++++++++++++++++++++++++++++++++++++++++*/
                    CmdGenerates = HashParms || '<' || '?NewLine>' || HashParms;
               /*++++++++++++++++++++++++++++++++++++++++++++++*/
               when HashCmd = HashPrefix || 'EXECPPW' then
               /*++++++++++++++++++++++++++++++++++++++++++++++*/
                    CmdGenerates = HashParms || d2c(10) || HashParms;
               /*++++++++++++++++++++++++++++++++++++++++++++++*/
               otherwise
               /*++++++++++++++++++++++++++++++++++++++++++++++*/
                    Error('Unknown command of "' || HashCmd || '"');
            end;
#DefineRexx


;--- Create macro to test use of unknown commands in a macro ----------------
#define XXXX            \
        (START)        -\
        #SET 222222_   -\
        #SET 333333_   -\
        (END)


;--- Do some tests (in and out of macro) ------------------------------------
1111111
<$XXXX>
4444444
#SET 555555_
#SET 666666_


;--- Test generation of ppwizard commands -----------------------------------
#ExecPpw #define A B

;--- Next line does and should fail (unknown command) -----------------------
#XXX .....


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

[Top][Contents][Search][Prev]: #Warning[Next]: Standard Definitions


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