Stack Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Stack-Operations >

Stack Commands

PVS. - PUsh Variables on the User-Stack

Previous Top Next


MiniRobotLanguage (MRL)

 

PVS. Command

Push Variables onto the User Stack without resolving them

 

 

Intention

 

Pushes the Variabler on top of the User-Stack.

Variables or special-folders are not processed.

 

You can PUV. any Stack Content into the variable(s).

 

While PVS. and PUS. explicitly does NOT resolve variables and special-folder, POP. does, PUV. PSS., PNS. also do that.

PVS. - Put Variable-Name on Stack without resolving anything

PSS. - Resolve Variables and Special-Folders before putting the Variable on Stack

PNS. - Do a numerical resolution and calculate Formulas in the Variable (if they are in ()). Then put the result on TOS.

PUV. - Do a Variable-Type dependent Variable resolution. Variables that are defined in some way have a Variable-Type (See GVT.-Command)

PUS. - Put Variable-Name on Stack without resolving anything. Unlike PVS., Variables will not be split if separated with |"|". Just the whole Parameter will be placed on TOS.

 

 

Using PVS. the Stack will look like this:

 

PVS_02

 

 

PVS_01

 

 

   If you want to retrieve the Variable unresolved from the Stack, you can use VAO. and $$000.

 

$$LAA="Hallo Ihr"

PVS.$$LAA

DMP.6

VAO.$$TXT=$$000

DMP.6

LEN.$$TXT|$$LEN

PRT.Length of TXT is: $$LEN

PRT.$$TXT

MBX.!

 

PVS_3

 

 

 

If you use POP. instead of VAO., the stack will look like that, and the Variable will be resolved:

 

PVS_4

 

 

 

You can use multiple Parameters, each of these will be placed on the Stack.

 

$$LAA="Hallo Ihr"

PVS.Hallo|$$LAA|$$LAA

DMP.6

POP.$$TXT

DMP.6

LEN.$$TXT|$$LEN

PRT.Length of TXT is: $$LEN

PRT.$$TXT

 

 

 

PVS_5

 

 

 

Syntax

 

PVS.P1[|Px ...|P25]

 

 

Parameter Explanation

 

P1 - (Variable or Text) will be placed directly on TOS without resolution,

P2 ...P25 - (optional) Each of these will be placed on the Stack.

 

The Stack being used is the actual User-Stack.

It can be the Local User Stack or the Global User-Stack, which depends on settings done with STS.-Command.

 

If the popped items are deleted from stack or not also depends on the settings done with STS.

 

 

 

 

Example

 

DBM.2

PRT.Items on Stack: #tos#

: $$TXA=Laba

: $$TXB=Lax

PRT. Variables Content (1): $$TXA-$$TXB

PVS.$$TXA|$$TXB

PRT. Items on Stack: #tos#

PRT. Item on TOS: <$dtos$>

DMP.4

END.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

 

See also:

 

    The global and local Stack

    STS. - Set STack Settings

    STJ. - STack Job

    STV. - Stack To/from Variable

    PUS. - Push Parameter onto Stack/Que

    POP. - POP Variable from Stack

    POV. - POp Variables from User-Stack