|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > STK. - Stack > STK.-Management > Stack Management Commands |
MiniRobotLanguage (MRL)
STK.Show
Display the contents of the stack in a console window
Intention
The STK.Show command is used to display the contents of a stack in a console window for debugging purposes. This is particularly useful when you need to inspect the state of the stack during script execution. The output includes the stack handle, data type, and all elements in the stack.
The command is non-destructive, meaning it does not modify the stack in any way.
Syntax
STK.Show|$$STK
Parameter Explanation
P1 - $$STK The handle of the stack whose contents are to be displayed.
Example
'***********************************
' STK.Show - Sample Script
'***********************************
' Create a new stack
STK.New|$$STK|s
' Push values onto the stack
STK.Push|$$STK|Hello
STK.Push|$$STK|World
STK.Push|$$STK|123
' Display the stack contents
STK.Show|$$STK
' End the script
ENR.
Remarks
-
Limitations:
- The stack must not be empty when using this command.
See also:
• STK.New
• STK.Push
• STK.Pop