*PUSH

<< Click to Display Table of Contents >>

Navigation:  Reference > Pre-processor >

*PUSH

This command is accepted for compatibility with earlier versions of PP. Use unique names for PP objects.

VERY IMPORTANT: text contents are not preserved with this command.

The *PUSH command saves the current index values on the next available level of the stack. There are 20 levels available, and a *PUSH to a 21st gives rise to an error.

*PUSH can work selectively, saving only some of the indices, allowing the others to be overwritten.

Note that the values of the indices are not altered by the *PUSH command.

The next occurrence of a *POP command will cause the saved values to be restored.

Examples:

[*push]

[*push Loop,LoopA,LoopB]

Here is an example of the use of *PUSH and *POP:

in the main stp file:

[*do lpLoop=1:4] [*insert filex.stp] [*end lpLoop]

in FILEX.STP:

[*push]

[*do lpLoop=1:8]

[*set Start = (lpLoop*8)-7]

...

[*end lpLoop]

[*pop]

With the *PUSH and *POP the insert file can use any PP indices without altering their values in the main CL script file. In this example the index Loop in the insert file does not affect the loop in script part above.