VBS tutorial: Functions – isarray functions

Time:2021-10-12

Isarray function

Returns a Boolean value indicating whether a variable is an array.

IsArray(varname)

varnameParameters can be any variable.

explain

If the variable is an array,IsArrayFunction returnTrue; Otherwise, the function returnsFalse。 When a variable contains an array, useIsArrayFunction is very effective.

The following example usesIsArrayFunction to verify whether myvariable is an array:

Dim myvariabledim myArray (3) myArray (0) = "Sunday" myArray (1) = "Monday" myArray (2) = "Tuesday" myvariable = isarray (myArray) 'myvariable contains "true".