MWE
05-29-2005, 06:37 PM
Is there a way to dynamically determine the size of an array. In particular, assume that the parent proc has dimensioned an array, X, at 5, e.g.,
Dim X(5) as Single
The parent then calls SubA and passes X as one of the arguements. Is there a way for SubA to "figure out" the size of X so that if the # of values to be stuffed in X exceeds the original dimension, SubA would stop and perhaps display an error message.
Solutions already considered:
1. pass the length of X to SubA
2. trap the error in SubA, e.g., On Error ...
Dim X(5) as Single
The parent then calls SubA and passes X as one of the arguements. Is there a way for SubA to "figure out" the size of X so that if the # of values to be stuffed in X exceeds the original dimension, SubA would stop and perhaps display an error message.
Solutions already considered:
1. pass the length of X to SubA
2. trap the error in SubA, e.g., On Error ...