One BIG caveat on that one: MATCHES expects the 2nd operand to be a pattern
matching string. If the contents of VAL2 are a valid pattern matching
expression, it will be treated as such, not as just any old string. For
example:
RPTEST
0001 CRT TIMEDATE()
0002 VAL1 = "1234567"
0003 VAL2 = "0X"
0004 VAL3 = "ABCDE"
0005 *
0006 IF (VAL1 MATCHES VAL2) THEN CRT "VAL1 --> VAL2"
0007 IF (VAL3 MATCHES VAL2) THEN CRT "VAL3 --> VAL2"
>
>RPTEST
16:55:38 13 JAN 2005
VAL1 --> VAL2
VAL3 --> VAL2
>
The string 0X (zero + 'X') means match any number of any sort of character
(alpha, num, etc.).
--Ron P.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Rex Gozar
Sent: Thursday, January 13, 2005 4:18 PM
To: [email protected]
Subject: RE: [U2] [UV]Strange But True
FYI - MATCH does a string comparison too. e.g.
VAL1 = "43008E-112"
VAL2 = "43008E-108"
IF (VAL1 MATCHES VAL2) THEN
CRT "THIS IS STRANGE"
END
does not print the message either.
-------
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/