1
Sep/090
Sep/090
Detect empty arrays in VBScript
So for those of you who have tried to determine the size of an array in VBScript and have failed this may be for you. I recently needed to be able to determine if an array was size 0 in VBscript and was running into some issues.
VBScript does not have a .SizeOf() function that you can execute on an array to determine it's size. Normally what I would do in most other languages is something like the following:
if sizeof(array) = 0
{
//do something here
}
To accomplish this in VBScript you need to do the following.
If IsNull(array) Then
//Do Something Here
End If
Why can't you do things like the rest of the world VBScript!!!!! That is all.