Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check for Nothing in vbscript/classic asp

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?

like image 821
Joel Coehoorn Avatar asked Apr 17 '26 07:04

Joel Coehoorn


2 Answers

er... I could be wrong, but isn't it just something like

If something Is Nothing Then
   'Do something here
Else
   'Do what I used to
End If
like image 105
Powerlord Avatar answered Apr 18 '26 21:04

Powerlord


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

like image 34
Konrad Rudolph Avatar answered Apr 18 '26 19:04

Konrad Rudolph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!