<< Click to Display Table of Contents >> Navigation: 3. Script Language > Stack-Operations > Stack Commands |
MiniRobotLanguage (MRL)
STS. Command
Set sTack Settings
Intention
This Command is the universal Command to manage the User-Stack/Que.
Syntax
STS.P1[|P2]...[|Px]
Parameter Explanation
P1 - TXT or VAR
P2 - Px - TXT or VAR
The following Stack-Commands can be given as Parameter and will be executed one after the other:
LOCAL - Switches all Commands to "LOCAL STACK"
GLOBAL - Switches all Commands to "GLOBAL STACK"
LIFO - Switches the actual Stack to LIFO*1 (Stack)
FIFO - Switches the actual Stack to FIFO*2 (Que)
SETNODEL - Switches the actual Stack to "No Delete"*3
SETDEL - Switches the actual Stack to "Delete"*4
STANDARD - Resets the Stack-Engine to Standard-Settings.*5
CLEAR - Clear the actual Stack, delete all Elements.
RESET - Clear Stack and Reset Settings
DUMP - Dump actual Stack into Console-Window.
SWAP - Exchange TOS and Stack Element below TOS.
DUPLICATE - Duplicate "Top-of-Stack"-Element.
REMOVE - Remove Element at TOS
You can write the first 4 letters of the Parameter or use the full word for better readability of the script.
Example
DBM.2
VAR.$$B00=Stackplace 2
' You can write the full words, but ...
STS.GLOBAL
VAR.$$B01=This will be duplicated
PUV.$$B00|$$B01
' The first 4 letters are enough
STS.DUMP,DUPL,DUMP,REMO,DUMP,DUPL,DUMP,REMO,REMO,DUMP
DMP.
MBX.Ready
ENR.
Remarks
*1 "LAST IN FIRST OUT"
*2 "FIRST IN FIRST OUT"
*3 Elements are NOT deleted when taken from Stack.
*4 Elements are deleted when taken from Stack. (Standard)
*5 Standard-Settings: LIFO, DELETE, MAX-Size=25 Elements.
Limitations:
There are no built-in Limitations to the number of Stack-Commands in a line.
Use the STV.-command to change the maximum number of stack elements.
See also:
• STV. - Stack To/from Variable
• PUS. - Push Parameter onto Stack/Que
• PUV. PUsh variables on the User-Stack
• POP. - POP Variable from Stack
• POV. - POp Variables from User-Stack