REMOVE is not universally available on all MV platforms. DCOUNT is. Read my
earlier post.

I'll yield to the REMOVE for this U2 forum. But I will provide a reason for
using DCOUNT for another purpose.

I don't trust the X<5,-1>=VAL when applied to an associated set of fields.
Somehow, somewhere one of the appended values will contain a null and the
set will shift. Thus
MV=DCOUNT(X<5><@VM)
MV=MV+1
X<5,MV>=VAL
X<6,MV>=ANOTHER VAL
X<7,MV>=VAL.THATS.NULL
X<8,MV>=MORE.VAL
will always keep the mv'd set intact.

Glad to tickle a response.
Mark Johnson

----- Original Message -----
From: "Womack, Adrian" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, July 10, 2005 9:09 PM
Subject: RE: [U2] THE variable names


> Mark, I don't like your example...
>
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Johnson
>
> > PRODS=ORD<15>
> > C.PRODS=DCOUNT(PRODS,CHAR(253))
> > FOR I=1 TO C.PRODS
> >     PROD=PRODS<1,I>
> > NEXT I
>
> I'd *much* prefer that written as...
>
> LOOP
>    REMOVE PROD FROM PRODS SETTING MORE.PRODS
>    ...do stuff...
> WHILE MORE.PRODS
> REPEAT
>
> I've never understood this need some programmers have for COUNTing the
> elements in an array - who cares who many there are? Usually the program
> just needs to process *all* of them.
>
>
>
>
>
> DISCLAIMER:
> Disclaimer.  This e-mail is private and confidential. If you are not the
intended recipient, please advise us by return e-mail immediately, and
delete the e-mail and any attachments without using or disclosing the
contents in any way. The views expressed in this e-mail are those of the
author, and do not represent those of this company unless this is clearly
indicated. You should scan this e-mail and any attachments for viruses. This
company accepts no liability for any direct or indirect damage or loss
resulting from the use of any attachments to this e-mail.
> -------
> 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