On Unidata, I saw a Unibasic tips write up from long ago. It said concatenation 
was faster than using a <-1> to build an array. The speed came from the fact 
that Unidata knew where the end of a variable was. So using concatenate, the 
process could jump to the end of the variable to add an element to the array. 
Where as <-1> had to traverse the entire array from the beginning every time. I 
don't know if this still holds true. But I still use the practice.

ARRAY = ''
DELIM.VALUE = ''
FOR VC = 1 TO SOME.VALUE.COUNTER
    (some processing to get a THE.NEXT.VALUE set)
        ARRAY := DELIM.VALUE:THE.NEXT.VALUE
        DELIM.VALUE = @AM
NEXT VC

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of MAJ Programming
Sent: Monday, March 05, 2007 11:12 AM
To: [email protected]
Subject: Re: [U2] Universe vs. Unidata


Please share what you consider 'Good Programming Practices'.

I've inherited thousands of programs during my decades with MV and I have
some methods that I like and many that I don't. I'm interested in another
programmers opinions.

In particular, I thought that EXTRACT was not taught anymore as the <>
nomenclature works as well. I use the <> construct incredibly often except
when I know that I am dealing with a dynamic array to parse through and it
may contain 10,000's of rows. Then REMOVE is by and large the more
effecient. I would not want to use REMOVE for simple data field extractions.
I use REMOVE for EDI or other parsing projects.

REMOVE proved incredibly faster than <> or EXTRACT with large files. That
was on a D3-W2K system if you're keeping score.

Thanks
Mark Johnson

BTW, I wrote a utility that will convert the functions EXTRACT, DELETE and
REPLACE with their equivilent <> forms in any source code. I leave INSERT
alone as its <> replacement is too platform specific.
----- Original Message -----
From: "Stevenson, Charles" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, March 05, 2007 11:13 AM
Subject: RE: [U2] Universe vs. Unidata


> Thanks, Drew.  My bet's riding on REMOVE.
>
> > I hope some have found this information helpful.  If I get
> > the chance, I'll try to do a more thorough testing of the
> > various dynamic array extraction methods  (EXTRACT vs REMOVE,
> > primarily) on each platform to help identifiy good
> > programming practices.
> -------
> 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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to