Eschew obfuscation. Either just use 0 and one, or write false=0;true=1. 
Similarly, for PL/I either just use '0'b and '1'b or write 
false='0'b;true='1'b;.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Bob 
Bridges <robhbrid...@gmail.com>
Sent: Saturday, September 5, 2020 4:09 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: REXX true/false (was Constant Identifiers)

<g> I've never done that, but I have done something like it:

  str=word('true false',(0-fx)+2)

...where fx is Boolean.  I hope I've done it only in programs I wrote for my 
own use.  But I sometimes write a tool for myself, then move it to a public 
library on request, so that monster may be out there somewhere.

(If I have to explain it, it just proves I should never write it that way in 
the first place.  This is better:

  if fx then str='true'; else str=true

But it sometimes pleases me to be too clever for my own good.)

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* In its state of nature [a dog] has a smell, and habits, which frustrate 
man's love; he washes it, house-trains it, teaches it not to steal, and is so 
enabled to love it completely.  To the puppy, the whole proceeding would seem, 
if it were a theologian, to cast grave doubts on the "goodness" of man; but the 
full-grown and full-trained dog, larger, healthier and longer-lived than the 
wild dog, and admitted, as it were by Grace, to a whole world of affections, 
loyalties, interests and comforts entirely beyond its animal destiny, would 
have no such doubt.  -C S Lewis, _The Problem of Pain_ */

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Friday, September 4, 2020 13:01

In Rexx I have sometimes, perhaps mischievously, replaced:
    IF (var_a = var_b) THEN
        THEN temp_var = some_string
        ELSE tenp_var = ''
    say string_a || temp_var || string_b

with:
    say string_a || copies( some_string, (var_a = var_b) )string_b

to save a few lines of code.

----------------------------------------------------------------------
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

Reply via email to