On Wed, Jul 25, 2012 at 3:28 PM, Wjhonson <wjhon...@aol.com> wrote: > > I'm on Universe 10.2.3 in Information flavor and was surprised by > something. > Admittedly I don't think I've actually come across this before, but it > seems like whoever wrote this, didn't understand how the system used it > either. > > If you dimensioned an array and then call a subroutine passing that array > CALL MYSUB(MAT SOMEARRAY) > > And then in the MYSUB routine, you Dimension that same variable name > again, but to a different size, what do you expect the Runtime Engine would > do? > > A) It would redim the array to the new size > B) It would complain and throw a fit > C) It would ignore my new dimension command as if it weren't there at all >
"An array variable that is passed to a subroutine in its entirety as an argument in a CALL statement cannot be redimensioned in the subroutine. Each array in a subroutine must be dimensioned once. The dimensions declared in the subroutine DIMENSION statement are ignored, however, when an array is passed to the subroutine as an argument" I'd be happy if Universe wouldn't let you redimension at any time--it seems like it causes more problems than it'd ever solve, especially when the next person comes along and tries to figure out that the program is doing. John _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users