The = compares numerically while the == is a strict compare of equality or 
inequality of the two strings.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Dyck, Lionel B. (TRA)
Sent: Friday, September 30, 2016 12:30 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: REXX Compare Anomaly

Here is a REXX challenge

Why does this compare results in ok

ttr = '0000E0'
if ttr = '000000' then say 'ok'; else say 'ng'

And this one works and results in ng

ttr = '0000E0'
if ttr == '000000' then say 'ok'; else say 'ng'


--------------------------------------------------------------------------
Lionel B. Dyck (TRA Contractor)
Mainframe Systems Programmer
Enterprise Infrastructure Support (Station 200) (005OP6.3.10) VA OI&T Service 
Delivery & Engineering


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

==========================
This email, and any files transmitted with it, is confidential and intended 
solely for the use of the individual or entity to which it is addressed. If you 
have received this email in error, please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee, you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this message by mistake and delete 
this e-mail from your system. If you are not the intended recipient, you are 
notified that disclosing, copying, distributing or taking any action in 
reliance on the contents of this information is strictly prohibited.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to