<< Click to Display Table of Contents >> Navigation: 3. Script Language > Stack-Operations > Stack Commands |
MiniRobotLanguage (MRL)
PUV. Command
PUsh Variable(s) on the user stack
Intention
Takes up to 25 variables, which content is been pushed on Top of the User-Stack/the Queue. Counterpart to POV. (POP Variables from Stack).
You can Push any variables onto the stack. PUV. will do a type-dependend variable resolution. This will only work, if the Variables have been defined with a type.
Otherwise the resolution will be a Binary-compatible Variable-resolution.
You can PUV. any Stack Content into the variable(s).
While PVS. and PUS. explicitly does NOT resolve variables and special-folder, POP. PUV. PSS., PNS do just 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.
Sample-Code and a Stack-Printout:
$$LAA="Hallo you "
PUV.People|$$LAA|$$LAA
DMP.6
POV.$$TXA|$$TXB|$$TXC
DMP.6
PRT.$$TXA#$$TXB##$$TXC
MBX.!
Syntax
PUV.P1[|P2]...[|P25]
Parameter Explanation
P1 - Variable
P2 - Px - Variables
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.
Speed in Ticks:
This command uses around 150 Ticks with one Parameter.
Example
' Pop Variables Content from User-Stack
'DBM.2
DBP.Items on Stack: #tos#
: $$TXA=Laba
: $$TXB=Lax
DBP. Variables Content (1): $$TXA-$$TXB
PUV.$$TXA|$$TXB
DBP. Items on Stack: #tos#
DBP. Item on TOS: <$dtos$>
DMP.4
: $$TXA=
: $$TXB=
DBP. Variables have been cleared (2): $$TXA-$$TXB
DMP.4
POV.$$TXB,$$TXA
DBP. Variables Content after POV. (3): $$TXA-$$TXB
MBX.Ready
END.
Remarks
-
Limitations:
25 Variables is the maximum number of possible parameters.
See also:
• STV. - Stack To/from Variable
• PUS. - Push Parameter onto Stack/Que
• POP. - POP Variable from Stack
• POV. - POp Variables from User-Stack