Mark Johnson wrote on Sun, 10 Jul 2005 23:12:25 -0400 > I'll yield to the REMOVE for this U2 forum. ... > > ----- Original Message ----- > From: "Womack, Adrian" <[EMAIL PROTECTED]> > .... > Mark, I don't like your example... > > <snip REMOVE example> > > 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.
The problem I have with REMOVE is that it only returns up to the next delimiter. If you have subvalue marks, you only get the first subvalue, rather than the list. Of course you can check the delimiter after each REMOVE, but in a case like this, I prefer to SELECT to a list variable and READNEXT each item. So, instead of: PRODS=ORD<15> C.PRODS=DCOUNT(PRODS,CHAR(253)) FOR I=1 TO C.PRODS PROD=PRODS<1,I> NEXT I I prefer: PROD.LIST = "" PRODS = RAISE(ORD<15>) SELECT PRODS TO PROD.LIST LOOP WHILE READNEXT PROD FROM PROD.LIST DO ... REPEAT (And in this case, the PROD.LIST = "" prevents a compiler warning about unitialized variables...) --Tom Pellitieri Century Equipment Toledo, Ohio ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
