Given the following snippet of code:
FOR PLC = 1 TO PART.LIST.COUNT
SEARCH.VALUE = DESC.LIST<PLC>
RETURN.VALUE := SEARCH.VALUE : @VM
NEXT PLC
ROLLSTOCK=RETURN.VALUE
I get the following output:
P337
P RPVC 0200x20.00 TNT201
P BOX 19:08 15:08 13:08
BX PLAC 20:08 15:08 11:14
However, a simple change to the code to only add a few digits of DESC.LIST<PLC> like
so:
FOR PLC = 1 TO PART.LIST.COUNT
SEARCH.VALUE = DESC.LIST<PLC>
IF SEARCH.VALUE[1,1]='*' THEN
SEARCH.VALUE = SEARCH.VALUE[4,4]
END ELSE
SEARCH.VALUE = SEARCH.VALUE[3,4]
END
RETURN.VALUE := SEARCH.VALUE : @VM
NEXT PLC
ROLLSTOCK=RETURN.VALUE
I get the following outupt...not what I was expecting:
37
P
My intention is to grab 4 characters out of DESC.LIST<PLC>, starting at character 4 if
the string starts with an asterix or 3 if it doesn't. Can anyone see what I'm doing
wrong here? Thanks.
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users