Re: [U2] Array Types

2012-07-28 Thread Kate Stanton
Dimensioned arrays may be used for file variables, or data that may have field marks or record marks. eg FNAM = FNAMS OPEN FNAM TO FVARS(FNO) ELSE On 28 July 2012 03:15, Bill Brutzman wrote: > I am surprised that anyone uses dimensioned arrays. I use dynamic arrays > for everything.

Re: [U2] Array Types

2012-07-28 Thread Wols Lists
On 27/07/12 17:41, Charlie Noah wrote: > Hi John, > > I had to jump in here, if for no other reason than to let people know > I'm still alive and kicking. :-) > > When you said "One thing you CAN'T do is insert a value." I hope you > meant attribute. Actually, you CAN insert attributes. No probl

Re: [U2] Array Types

2012-07-27 Thread Wjhonson
On my system, the limit seems to be somewhere around 10 million cells between 10 and 11 something like that -Original Message- From: Mark Eastwood To: 'U2 Users List' Sent: Fri, Jul 27, 2012 11:02 am Subject: Re: [U2] Array Types And don't DIM arrays have a li

Re: [U2] Array Types

2012-07-27 Thread Wjhonson
Old limit. No longer applies. -Original Message- From: Mark Eastwood To: 'U2 Users List' Sent: Fri, Jul 27, 2012 11:02 am Subject: Re: [U2] Array Types And don't DIM arrays have a limit - something like 64000 elements? i.e. can't DIM X(1000,1000) -Origin

Re: [U2] Array Types

2012-07-27 Thread Wjhonson
I agree that it saves time on both. I'm suggesting that the differential is *much* greater for writing, than for reading -Original Message- From: David L. Wasylenko To: U2 Users List Sent: Fri, Jul 27, 2012 10:59 am Subject: Re: [U2] Array Types DIM saves time on read and

Re: [U2] Array Types

2012-07-27 Thread Rick Nuckolls
Now) > > Crt "Dimensioned Array Read Only" > Now = Time() > For I = 1 To 100 > Fin = @False > > Select F.SALES > Loop >ReadNext Id Else Fin = @True > Until Fin Do > MatRead SALESREC

Re: [U2] Array Types

2012-07-27 Thread Mark Eastwood
'U2 Users List' Subject: Re: [U2] Array Types SPEED! Other than the extra time spent to build it, it is MUCH faster to access VAR(1000) than to access VAR<1000>. If I know my variables are going to be small or I am doing reads, yeah, I use dynamic arrays. If I am building some

Re: [U2] Array Types

2012-07-27 Thread David L. Wasylenko
...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Friday, July 27, 2012 12:29 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Array Types I would suggest that random writing would have a substantial impact. Reading doesn't have to move the string arou

Re: [U2] Array Types

2012-07-27 Thread Wjhonson
I would suggest that random writing would have a substantial impact. Reading doesn't have to move the string around, I suggest that's where your real savings comes in. -Original Message- From: Brian Leach To: 'U2 Users List' Sent: Fri, Jul 27, 2012 10:25 am Sub

Re: [U2] Array Types

2012-07-27 Thread Israel, John R.
Yes! Thanks for that clarification. I did mean ATTRIBUTE. Thanks Charlie. JRI -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charlie Noah Sent: Friday, July 27, 2012 12:42 PM To: U2 Users List Subject: Re: [U2

Re: [U2] Array Types

2012-07-27 Thread Brian Leach
Until Fin Do MatRead SALESREC From F.SALES, Id Else Mat SALESREC = '' End Repeat Next Crt "Time taken : ": (Time() - Now) STOP -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-user

Re: [U2] Array Types

2012-07-27 Thread Charlie Noah
Hi John, I had to jump in here, if for no other reason than to let people know I'm still alive and kicking. :-) When you said "One thing you CAN'T do is insert a value." I hope you meant attribute. You can insert (and delete) values and subvalues all day long. If you are working with an item

Re: [U2] Array Types

2012-07-27 Thread Israel, John R.
SPEED! Other than the extra time spent to build it, it is MUCH faster to access VAR(1000) than to access VAR<1000>. If I know my variables are going to be small or I am doing reads, yeah, I use dynamic arrays. If I am building some big arrays in a program, I usually use dim arrays. One thing

Re: [U2] Array Types

2012-07-27 Thread Wjhonson
Well with the caveat that the hint mechanism only works if you are processing the elements in order. Sometimes you're not. -Original Message- From: Brian Leach To: 'U2 Users List' Sent: Fri, Jul 27, 2012 8:55 am Subject: Re: [U2] Array Types Mainly if I want an

Re: [U2] Array Types

2012-07-27 Thread Wjhonson
Dimensioned arrays have the advantage that each cell is directly addressable by the Runtime Engine. Dynamic arrays are addressed by one pointer to the entire string. DIM MYARRAY(200) YOURARRAY = '' YOURARRAY<200> = 'BOOGER' MYARRAY(200) = 'BOOGER' What the Runtime Engine does for yourarray is

Re: [U2] Array Types

2012-07-27 Thread Martin Phillips
Hi Jeff, The answer depends partly on whether you are using UniVerse or Unidata. In general, a dimensioned matrix will be faster because you can index directly to the required item, however, you have to trade this against the cost of doing MATREAD or some equivalent to populate it. Also inserti

Re: [U2] Array Types

2012-07-27 Thread David L. Wasylenko
.u2ug.org] On Behalf Of jbut...@hampshire.edu Sent: Friday, July 27, 2012 10:24 AM To: U2 Users List Cc: U2 Users List Subject: Re: [U2] Array Types I understand the performance trade off between dynamic and dimensioned arrays but I'm curious about quantifying. I know the answer will depend o

Re: [U2] Array Types

2012-07-27 Thread Brian Leach
Mainly if I want another level for intermediate processing, as each dimensioned array element can hold a dynamic array, or if I need the speed of accessing fields over values to take advantage of the hint mechanism in UniVerse. If you need to do a load of processing of values in a dynamic array (e.

Re: [U2] Array Types

2012-07-27 Thread jbut...@hampshire.edu
I understand the performance trade off between dynamic and dimensioned arrays but I'm curious about quantifying. I know the answer will depend on hardware and load, but in general at what point (length) do dimensioned arrays become better performing than dynamic? 1000? 1? 10? Any examp

Re: [U2] Array Types

2012-07-27 Thread David L. Wasylenko
Speed There is a *long* thread here demonstrating the difference between *DAYS* of processing and seconds, using large records for demonstration. ... david ... David L. Wasylenko President, Pick Professionals, Inc w) 314 558 1482 d...@pickpro.com -Original Message- From: u2-users-boun.