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

#push

This command can be used for 2 distinct purposes:

  1. To validate the nesting level of 2 macros which work in pairs.

  2. To save macros or rexx variables onto a stack. This is useful for recursive type applications.

Syntax #1

[WhiteSpace]#push  ["]Stack Name["]

When only one parameter is passed it is a simple stack push with the name of the stack being passed. The same name should be used on the #POP command.

Syntax #2

[WhiteSpace]#push  ["]Type["]  ["]Item["] ...

The "Type" parameter is used to indicate what sort of information is being pushed. This should be "MACRO" for macro values or "REXXVAR" for rexx variables. Note that separate stacks are maintained for macro and rexx variables.

You may specify one or more "Item" parameters. These are pushed (with StackPush()) onto a stack from left to right. The #POP command can be used to remove the items.

Example

;---Set rexx variable and Save ---
#RexxVar RxVar = 'Demonstating overlap'
#push RexxVar RxVar

;--- Set macros and save value ---
#define  FirstMacro   Something1
#define  SecondMacro  Something2
#push macro FirstMacro SecondMacro

;--- Restore The rexx variable ---
#pop RexxVar RxVar

;--- Change Value ---
#define  FirstMacro   SomethingElse1

;--- Restore Values ---
#pop macro FirstMacro SecondMacro


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

[Top][Contents][Search][Prev]: #OutputHold[Next]: #pop


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