Skip to main content

If-Dictionary

Command Description

Determine if the data is a dictionary

Command Prototype

bRet = IsDictionary(varData)

Parameter Description

ParameterRequiredTypeDefaultDescription
varDataTrueexpression$PrevResultThe data to be determined

return

bRet,The variable used to save the output of the command.

Demo

TracePrint("---------------------------------is a dictionary------- --------------------------") 
//-------------------------------------------------------------------------------
//[Remarks] Determine whether the data type is a dictionary.
//Input parameter 1:
// varData----->target data
//out parameters:
// returns the result of a dictionary, true and false
a = {"a":1,"b":2,"c":3}
bRet = IsDictionary(a)
TracePrint("Let the variable a be {'a':1,'b':2,'c':3} to judge whether the variable a is a dictionary, the result is: ")
TracePrint(bRet)

a = "Hello UiBot"
bRet = IsDictionary(a)
TracePrint("Let the variable a be Hello UiBot to judge whether the variable a is a dictionary, the result is: ")
TracePrint(bRet)