Posted By

wizard04 on 09/11/09


Tagged

array ASP vbscript


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

nelda751
benrudolph


Testing for Empty Arrays


 / Published in: ASP
 

URL: http://en.wiki.mcneel.com/default.aspx/McNeel/RsEmptyArray

Checks if an array has been initialized, even if it is a dynamic array.

  1. '****************************************
  2. ' Checks if an array has been initialized, even if it is a dynamic array.
  3. '
  4. ' Got this from http://en.wiki.mcneel.com/default.aspx/McNeel/RsEmptyArray
  5. '****************************************
  6.  
  7. Function IsArrayDimmed(arr)
  8. IsArrayDimmed = False
  9. If IsArray(arr) Then
  10. On Error Resume Next
  11. Dim ub : ub = UBound(arr)
  12. If (Err.Number = 0) And (ub >= 0) Then IsArrayDimmed = True
  13. End If
  14. End Function

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: wizard04 on April 16, 2014

The latest: https://gist.github.com/wizard04wsu/8826741

You need to login to post a comment.