If-Array
Command Description
Determine if the data is an array
Command Prototype
bRet = IsArray(varData)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
varData | True | expression | $PrevResult | The data to be determined |
return
bRet,The variable used to save the output of the command.
Demo
TracePrint("---------------------------------is an array------------ --------------------------")
//-------------------------------------------------------------------------------
//[Remarks] Determine whether the data type is an array.
//Input parameter 1:
// varData----->target data
//out parameters:
// returns the result of whether it is an array, true and false
a = [1,2,3]
bRet = IsArray(a)
TracePrint("Let the variable a be [1,2,3] to judge whether the variable a is an array, the result is: ")
TracePrint(bRet)
a = "Hello UiBot"
bRet = IsArray(a)
TracePrint("Let the variable a be Hello UiBot to judge whether the variable a is an array, the result is: ")
TracePrint(bRet)