出栈


描述

With this action you can pop a value off the top of a stack data structure. You supply the variable that holds the stack index (as returned by the action Create Stack) and then give the target variable that should hold the returned variable (which can be flagged as a temporary local variable).


动作语法:

Pop Stack Syntax


参数:

参数 描述
堆栈 The index (stored in a variable) of the stack to use
目标 用于保存返回值的目标变量


例如:

Pop Stack Example
The above action block code checks to see if the given stack is empty, and if it is not, it pops the top value off and stores it in a temporary variable. This is then used to set an alarm, while if the stack is empty, 10 random values are pushed onto the stack.