VBScript IsArrayFunction


VBScript 参考手册Complete VBScript Reference Manual

The IsArray function returns a Boolean value indicating whether the specified variable is an array. If the variable is an array, it returns True; otherwise, it returns False.

Syntax

IsArray(variable)

Parameters Description
variable Required. Any variable.

Examples

Example 1

<script type="text/vbscript">

days=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
document.write(IsArray(days))

</script>

Output of the above example:

True

Try it »

Example 2

<script type="text/vbscript">

Dim a(5)
a(0)="Saturday"
a(1)="Sunday"
a(2)="Monday"
a(3)="Tuesday"
a(4)="Wednesday"
document.write(IsArray(a))

</script>

Output of the above example:

True

Try it »

Example 3

<script type="text/vbscript">

a="Saturday"
document.write(IsArray(a))

</script>

Output of the above example:

False

Try it »

VBScript 参考手册Complete VBScript Reference Manual Other Extensions