Who says us old dogs can't learn new tricks. I can think of prior D3
applications where I had a large DIM just to breeze through an indexed
array. REMOVE has now been added to my bag of tricks.

Thanks.
----- Original Message -----
From: "Bill_H" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, July 29, 2005 8:56 PM
Subject: RE: [U2] Text extraction.


> Mark:
>
> Generally, the FOR/NEXT structure is used for looping where the loop count
> is known.  If the loop count is unknown the LOOP/REPEAT structure should
be
> used.  Don't try to fit a square peg into a round hole.
>
> The REMOVE function is designed to traverse an array while preventing the
> next field read from having to start from the beginning of the array.
When
> using small arrays, the need to use REMOVE is unnecessary.  However, when
> using large arrays REMOVE is mandatory (this isn't true in UV).  This is
not
> true for D3, mvBase, and maybe UniData.
>
> So, use REMOVE when traversing large arrays and forget this FOR/NEXT
looping
> BS.  If you're only wanting to extract single valued arrays then READNEXT
> works just fine.  D3 doesn't allow a SELECT to create a READNEXT list from
> an array so REMOVE is all D3 can use.
>
> As a result, REMOVE seems to be the generic statement to use under the
> specific circumstances.  However, the syntax for D3 is different than the
UV
> so one should keep in mind of the potential differences.
>
> Hope this helps.
>
> Bill
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Mark Johnson
> > Sent: Friday, July 29, 2005 4:33 PM
> > To: [email protected]
> > Subject: Re: [U2] Text extraction.
> >
> > I guess I was more focused on the REMOVE statement and let my
> > fingers do the other typing. I'm not a LOOP REPEAT guy but
> > rather a FOR NEXT guy, especially when knowing the boundary
> > values. Not knowing the ending value of D caused me to use
> > LOOP REPEAT which, given the wide variety of placements for
> > the WHILE and UNTIL clauses, used the wrong one first.
> >
> > Since REMOVE (sans DCOUNT) doesn't know the end value,
> > putting it in a FOR NEXT loop may require FOR I=1 TO I+1. I
> > don't like using FOR I=1 TO I+1 as it mentally doesn't have a
> > real ending. I'd rather DCOUNT a known ending, use LOOP UNTIL
> > "", REMOVE (with some more good experiences behind me) or use
> > the EXIT clause. In my travels, the FOR I=1 TO I+1 usually
> > has a test and a branch out of the loop which brings in
> > single purpose statement labels which this forum frowns upon.
> >
> > BTW, i just tested REMOVE on D3 sans the AT clause  and it
> > didn't compile.
> > That doesn't mean that it won't if another $OPTIONS clause is
> > brought into the fray.
> >
> > Being an old-school guy, I got a little gun shy with all of
> > the $OPTIONS and UDT.OPTIONS in my travels. Being a
> > consultant and not a full time programmer or admin at my
> > client's locations, I dare not fiddle with these settings.
> > Every one of my clients has had their systems established by
> > a VAR or someone else before me. I'm usually the current cook
> > in the application kitchen. I don't need a phone call on
> > Tuesday for some OPTION that I mis-set on Monday.
> >
> > Thanks
> > Mark Johnson
> > ----- Original Message -----
> > From: "Ken Wallis" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Thursday, July 28, 2005 8:41 PM
> > Subject: RE: [U2] Text extraction.
> >
> >
> > > > Does this behave (misbehave) on u2 systems, ie be careful of the
> > > > location of the UNTIL statement?
> > >
> > > Mark, that is the documented behaviour, it certainly isn't
> > misbehaving.
> > >
> > > Yes, you have to be precise about when you terminate the loop, but
> > > surely
> > a
> > > guy with your experience would always be precise about such things?
> > >
> > > BTW, is the AT clause something that D3 requires?  UniData,
> > UniVerse
> > > and jBASE certainly don't.
> > >
> > > Cheers,
> > >
> > > Ken
> > > -------
> > > 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/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to