If Data Structure Exists Icon If Data Structure Exists

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.

Note that to add actions into the "if" block, they should be dropped to the side of the action, as shown in the image below:

If DS Exists drop actionsThese actions will now be run if the "if" evaluates to true, while any actions dropped elsewhere will be performed after the "if" block.

 

Action Syntax:

If Data Structure Exists Action

Arguments:

ArgumentDescription
StructureThe type of data structure to check for (List, Map, Grid or Stack)
VariableThe variable holding the data structure index

 

Example:

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