When I tested it, the last dimensioned element was not multivalued, and writing to it did not cause loss of data. That may be a flavor issue.
Thanks for the warning. George >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Thursday, May 12, 2005 11:44 AM >To: [email protected] >Cc: George Gallen >Subject: RE: [U2] I'm in an Array quandry, any suggestions... > > >Watch Out!!! >If your program changes the last dimensioned field, you will lose the >extra data!!! IIRC, the extra fields are being appended to the last >dimensioned element. If you change that element, the extra fields can >disappear. >You'd have to do something like: >MYARRAY(5)<1> = "newvalue" >And not >MYARRAY(5) = "newvalue" > > > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of George Gallen >Sent: Thursday, May 12, 2005 11:01 AM >To: [email protected] >Subject: RE: [U2] I'm in an Array quandry, any suggestions... > >WOW. I just found an interesting "feature" of UV. > >You can MATREAD a record that has more fields than are dimensioned, > and you can MATWRITE that record back out INTACT without getting an >error, > >It only bombs with an out of bounds error when you try to reference a >subscript > past the dimension. > >So....as long as any of those program dont try to mess with data it >doesn't >know > about, we "should" be safe. > >George > >>-----Original Message----- >>[mailto:[EMAIL PROTECTED] Behalf Of George Gallen >> >>I'm modifying some programs that were written about 15-20 years ago, >>there must be 30 or 40 that >> interact with each other. >> >>Here is the problem. >>All the programs use dimensioned arrays, and they were dimensioned to >>exactly what was needed >> at the time, now I need to add 4 fields to one program. But >I'm afraid >>if another program reads this >> newly created array, it will bomb out with an array out of bounds >>error. >> >>What is on my side, is all the programs that reference these >files, all >>use the same variable name. >> >>My initial thought was to write a small program that will >> 1. open a program >> 2. search for a dimension of the suspect variable(s) >> 3. increase it's dimension level >> 4. write the program back out >> 5. recompile the program (I don't believe any are cataloged) >> >>Any other ideas? >------- >u2-users mailing list >[email protected] >To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
