如果数据结构为空


描述

With this action you can check a to see if the given data structure is empty or not. You first need to pick the type of data structure to check for (either a List, a Map, or a Stack - no grids since they cannot even be empty) and then you supply the variable that holds the data structure index (as returned by the actions Create List, Create Map, and Create Stack). The action will return true if the data structure is empty, and false if it is not. Note that you can flag "not" in the action to check if a data structure does hold data by checking if it is not empty.

请注意,如果要将动作添加进 "if" 动作块,应该将它们放置到动作的侧边,如下图所示:
If Empty Drop Actions

如果 if 的判断结果是 。那么此动作将会马上执行。放在别处的动作将会在此 if 动作块后执行。


动作语法:

If Data Structure Empty Syntax


参数:

参数 描述
结构 The type of data structure to check (List, Map, or Stack)
变量 The variable holding the data structure index


例如:

If Data Structure Empty Example
上面的动作块代码检查全局变量中引用的数据结构是否为为空,如果是这种情况,则清除数据结构。