Check for Nothing in vbscript/classic asp

Joel Coehoorn picture Joel Coehoorn · Apr 22, 2009 · Viewed 15.1k times · Source

I need to update an old classic asp, and I have to call a function that normally returns an array, but under certain circumstances might return either Nothing or an undefined value.

How can I check that the result actually returns an array?

Answer

Konrad Rudolph picture Konrad Rudolph · Apr 22, 2009

Is the function late bound / has a Variant return value? If so, the IsArray function will check whether it contains an array type.