PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: HOOK_OUTPUT[Next]: PPWIZARD_DEFAULT_#(_SEPARATOR
\ -> Configuration -> Configuration Macros -> HOOK_UNKNOWN_MACRO


This configuration macro allows you to intercept the error handling when a macro was not found. If the hook does not exist then PPWIZARD will simply abort displaying the usual error message.

The hook allow you to either supply a value for the non-existent variable or alter the error message. The hook should not perform any macro substitution.

This variable defines the name of a macro which contains the rexx code to be executed, this code should be "pre-expanded" (not contain any references to macros).

The rexx code gets passed these variables:


;--- Define hook ------------------------------------------------------------
    ;--- Handle specifc variables -------------------------------------------
    if  translate(HookDefineName) = 'SOMEMACROWHICHWEWILLCONTINUEON' then
        ;--- We will supply the value for this macro ------------------------
        HookDefineValue    = "{{This macro does not exist}}";
        HookDefineContinue = 'Y'

    ;--- Finished all known substitutions -----------------------------------
    if  HookDefineContinue = 'N' then    ;;Did we substitute a value?
        ;--- Update the error message we will display -----------------------
        HookDefineValue = HookDefineValue || '0A0A'x || 'Perhaps this is an obsolete WISEINST variable?'

;--- Test Hook --------------------------------------------------------------
C. <$SomeMacroWhichWeWillContinueOn $$UPPER>

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

[Top][Contents][Search][Prev]: HOOK_OUTPUT[Next]: PPWIZARD_DEFAULT_#(_SEPARATOR

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