Re: Array Dimensioned or not

From: Saga (antiSpam_at_somewhere.com)
Date: 11/30/04


Date: Tue, 30 Nov 2004 14:21:25 -0600


Create a boolean function, create an error handler and
then access the first element of the array. If it does not
error out, set the function to true. Do nothing in the error
handler so the function will return false.

Not elegant, but simple <g>
Saga

"uo" <notreal@notreal.com> wrote in message
news:Q_-dndVjn_JdSDHcRVn-gA@igs.net...
> How can I check whether an array has been dimensioned in order to
> avoid an
> error when calling ubound() with an undimensioned array ? Is there any
> elegant/simple way of doing this other than trapping errors.
>
> Thanks.
>
>



Relevant Pages

  • Re: subscript out of range
    ... I don't have a big problem with an error handler in these cases ... > Dim lplpSafeArray As Long ... > ' If the array has 1 or more dims, ...
    (microsoft.public.vb.general.discussion)
  • BDB-BASIC Snapshot Release 0.25 Now Available
    ... The Error Handler has changed. ... Documented several undocumented commands. ... EDIT command support ... FIRST and LAST functions added for array ...
    (comp.lang.basic.misc)
  • Re: Array Dimensioned or not
    ... Or call UBound. ... create an error handler and ... > then access the first element of the array. ...
    (microsoft.public.vb.general.discussion)
  • Re: Is it correct that execute_array does not raise/print an error
    ... stored in the ArrayTupleStatus have a parse through that array to see it the ... my error handler is not called and no error is printed despite setting ... PrintError and RaiseError. ...
    (perl.dbi.users)
  • Re: A[x][y][z]
    ... This would be a simple one-liner in the elegant Snobol language.Sadly, ... "Let's make our language more like Pascal." ... and array elements. ... whether 'a' is an array of pointers to arrays ...
    (comp.lang.c)