Well, in an INFORMATION flavor dimensioned arrays are supposed to be dynamically resizable, which can sometimes be useful if you are using them for temporary storage (building lists against category groups or the like). So the right action would be that it should allow redimensioning without complaints as the array should just be a pointer to a dynamically allocated structure, as in other languages.
If you use PICK flavor or $OPTIONS M then they should be fixed from creation, reflecting the original limitations/addressing on the old Pick OS. The rationale behind that was the speed at which individual elements could be accessed and limitations on EQUating to field elements, which is why you still see a lot of matread and matwrite even in cases where the benefits are negligible in UniVerse. It does make it a pain that you can't mix and match flavors if you have named common, as the addressing/sizing of an INFORMATION and a PICK style common block (which seem to follow the same pattern) are different. Brian -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: 25 July 2012 23:28 To: u2-users@listserver.u2ug.org Subject: [U2] Passing dimensioned arrays 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 _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users