Re: REXX Compare Anomaly

2016-10-04 Thread CM Poncelet

aka NAPWAD ... 

CM Poncelet wrote:


NOPWAD 

Paul Gilmartin wrote:


On Tue, 4 Oct 2016 19:20:09 +, Ward, Mike S wrote:

 


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

   


Yup.

In one of these fora lately a user complained that he found "==" offensive
and avoided its use because it's reminiscent of "C".

-- gil

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


 



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


Re: REXX Compare Anomaly

2016-10-04 Thread CM Poncelet

NOPWAD 

Paul Gilmartin wrote:


On Tue, 4 Oct 2016 19:20:09 +, Ward, Mike S wrote:

 


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

   


Yup.

In one of these fora lately a user complained that he found "==" offensive
and avoided its use because it's reminiscent of "C".

-- gil

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


 



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


Re: REXX Compare Anomaly

2016-10-04 Thread Paul Gilmartin
On Tue, 4 Oct 2016 19:20:09 +, Ward, Mike S wrote:

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

In one of these fora lately a user complained that he found "==" offensive
and avoided its use because it's reminiscent of "C".

-- gil

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


Re: REXX Compare Anomaly

2016-10-04 Thread Ward, Mike S
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 = 'E0'
if ttr = '00' then say 'ok'; else say 'ng'

And this one works and results in ng

ttr = 'E0'
if ttr == '00' then say 'ok'; else say 'ng'


--
Lionel B. Dyck (TRA Contractor)
Mainframe Systems Programmer
Enterprise Infrastructure Support (Station 200) (005OP6.3.10) VA OI 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


Re: REXX Compare Anomaly

2016-09-30 Thread Robert Prins

On 2016-09-30 17:30, Dyck, Lionel B. , TRA wrote:

Here is a REXX challenge

Why does this compare results in ok

ttr = 'E0'
if ttr = '00' then say 'ok'; else say 'ng'

And this one works and results in ng

ttr = 'E0'
if ttr == '00' then say 'ok'; else say 'ng'


If you don't use strict compares, you can get this nice one:

/* REXX */
a = '2e0'
b = '2ee'
c = '1e1'

say "a =" a;
say "b =" b
say "c =" c

if a > b then
  say 'a > b'
else
  say 'a ^> b'

if b > c then
  say 'b > c'
else
  say 'b ^> c'

if c > a then
  say 'c > a'
else
  say 'c ^> a'

Robert
--
Robert AH Prins
robert(a)prino(d)org

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


Re: REXX Compare Anomaly

2016-09-30 Thread Dyck, Lionel B. (TRA)
Ah - that's what I was missing - the bloody ttr looks like scientific notation 
- arg!

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


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Pfister, Nathan
Sent: Friday, September 30, 2016 12:37 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: REXX Compare Anomaly

Numeric compare vs. strict compare (and the fact that REXX supports scientific 
notation).  The first one is e0 (scientific notation) which equates to 0, 
the second, since you are using the strictly equal operator it resolves false.


-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 1: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 = 'E0'
if ttr = '00' then say 'ok'; else say 'ng'

And this one works and results in ng

ttr = 'E0'
if ttr == '00' then say 'ok'; else say 'ng'


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


--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN E-MAIL CONFIDENTIALITY 
NOTICE: This e-mail from Donegal Insurance Group may contain CONFIDENTIAL and 
legally protected information. If you are not an intended recipient, please do 
not copy, use or disclose this email or its contents to others; and please 
notify us by calling toll free (800) 877-0600 x7880 or by replying to this 
message, and then delete it from your system. Delivery of this email to an 
unintended recipient is not a waiver of any attorney-client or other applicable 
privilege.

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

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


Re: REXX Compare Anomaly

2016-09-30 Thread Pfister, Nathan
Numeric compare vs. strict compare (and the fact that REXX supports scientific 
notation).  The first one is e0 (scientific notation) which equates to 0, 
the second, since you are using the strictly equal operator it resolves false.


-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 1: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 = 'E0'
if ttr = '00' then say 'ok'; else say 'ng'

And this one works and results in ng

ttr = 'E0'
if ttr == '00' then say 'ok'; else say 'ng'


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


--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN
E-MAIL CONFIDENTIALITY NOTICE: This e-mail from Donegal Insurance Group may 
contain CONFIDENTIAL and legally protected information. If you are not an 
intended recipient, please do not copy, use or disclose this email or its 
contents to others; and please notify us by calling toll free (800) 877-0600 
x7880 or by replying to this message, and then delete it from your system. 
Delivery of this email to an unintended recipient is not a waiver of any 
attorney-client or other applicable privilege.

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