RE: [U2] I'm in an Array quandary, any suggestions...
Mats wrote OK, sure. But readnext doesn't really work on an array but on a select list. Will wrote: Ah but that's not so. You can SELECT myVAR You can SELECT myVAR to LIST5 You can SELECT myVAR to MyLIST and then you *can* in fact READNEXT your array. Selecting the variable turns a dynamic array into a list type variable. Not wanting to put words in Mats' mouth, but I expect he meant that READNEXT didn't work on arrays in the traditional sense. And by that, I don't mean the traditional PICK sense, but the general programming sense. An array in most languages is a collection of (normally similar) objects which can be operated on either in sequence or at random because the array mechanism provides primitives to do that neatly and efficiently. READNEXT can only ever process a select list - a structure that is in many ways like a dynamic array *EXCEPT* that you can't work with any item except the first. Yes, it is easy to map an array into a select list, and vice-versa, but you can't address the 23rd element of a select list without processing the first 22. Some would say the same of a dynamic array because, under the covers, BASIC pretty much does that anyway, but semantically you can address any element of a dynamic array at any time, while semantically, BASIC provides no such mechanism for a select list. Cheers, Ken --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] I'm in an Array quandary, any suggestions...
Ken, Thanks for the suggestion, but that would require changing programs that we had no intention of changing. Further making such changes is much larger than can fit within the scope of the current enhancement project. A global system switch that effected just this one behavior would have been nice, but guess it is not to be. Honestly, I didn't hold out much hope, but it was worth a shot. Rich Taylor | Senior Programmer/Analyst| VERTIS 250 W. Pratt Street | Baltimore, MD 21201 P 410.361.8688 | F 410.528.0319 [EMAIL PROTECTED] | http://www.vertisinc.com Vertis is the premier provider of targeted advertising, media, and marketing services that drive consumers to marketers more effectively. The more they complicate the plumbing the easier it is to stop up the drain - Montgomery Scott NCC-1701 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Wallis Sent: Friday, May 13, 2005 11:01 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] I'm in an Array quandary, any suggestions... REC(0) references a dimensioned array and, apparently, in UV holds all fields that could not fit into the dimension of the array. UniData does not work this way, it puts it into the last dimension of the array which could result in data loss if you change that array position. We have confirmed this on our system as we are faced with the same problem. -- Here is a question to the group. Is this a behaviour in UD that can be changed in a configuration setting? Again, as with UV, UD is emulation dependant on this. Basictype 'u' and 'm' use element (0,0) IIRC, while 'p' and 'r' put the data at the end, or simply truncate it - I can't remember. If for some reason you need to operate your account with BASICTYPE 'p', then you can always drop a 'BASICTYPE u' statement into the top of a program you want to behave sensibly. HTH, Ken --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] I'm in an Array quandary, any suggestions...
REC(0) references a dimensioned array and, apparently, in UV holds all fields that could not fit into the dimension of the array. UniData does not work this way, it puts it into the last dimension of the array which could result in data loss if you change that array position. We have confirmed this on our system as we are faced with the same problem. -- Here is a question to the group. Is this a behaviour in UD that can be changed in a configuration setting? Again, as with UV, UD is emulation dependant on this. Basictype 'u' and 'm' use element (0,0) IIRC, while 'p' and 'r' put the data at the end, or simply truncate it - I can't remember. If for some reason you need to operate your account with BASICTYPE 'p', then you can always drop a 'BASICTYPE u' statement into the top of a program you want to behave sensibly. HTH, Ken --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/