如果数据结构存在


描述

With this action you can check a variable to see if it indexes a data structure or not . You first need to pick the type of data structure to check for (either a List, a Map, a Grid or a Stack) and then you supply the variable that holds the data structure index (as returned by the actions Create List, Create Map, Create Grid, and Create Stack). The action will return true if the data structure exists, and false if it does not. Note that you can flag "not" in the action to check if a variable does not hold a data structure index.

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

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


动作语法:

If Data Structure Exists Syntax


参数:

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


例如:

If Data Structure Exists Example
The above action block code checks to see if the given data structure exists and if it does it is freed from memory.