Re: subscript out of range




"Karl E. Peterson" <karl@xxxxxxxx> wrote
> Isn't life funny sometimes? I needed to do this just today. Simple case. VB6
> function that returns an array. Usually. Unless the input is invalid. Well, I
> can't test Ubound() on the return.

Why not?

If a function is going to return an array, then shouldn't it be designed to
return an array in all cases?

LFS


.



Relevant Pages

  • Re: Q: Checking the size of a non-allocated array?
    ... an actual argument is already invalid ... First note that you don't have an unallocated array in the subroutine. ... it is comparable to disassociated or undefined pointers. ... Obviously the compiler has ...
    (comp.lang.fortran)
  • Re: HELP! Trying to add Email Notification to Download File Code
    ... This warning will go away once you get the headers sorted out. ... Invalid argument supplied for foreachin ... # verifies if the $filelist array has an element ... # builds an array with all valid files in the ...
    (comp.lang.php)
  • Re: A Question of design.
    ... items that are invalid. ... Then create an array of already owned items, ... Then you end up with a race condition, I think even if a transaction ...
    (comp.lang.php)
  • Re: WaitForMultipleObjects returning ERROR_INVALID_HANDLE
    ... Printing the array of handles in question did not show any unusual thing, ... i.e. all handles retain their values, no matter if the error occures or ... By the same analogy with dangling pointer a handle can contain plausible value, while being invalid. ...
    (microsoft.public.vc.language)
  • array operations on non-conforming arrays -- do compilers catch them?
    ... I am finding that most Fortran 95 compilers do not catch, ... many invalid uses of non-conforming arrays when array subscripts ... For the following invalid code, ...
    (comp.lang.fortran)