Yes, you can count on the truth values of 0 and 1 in REXX never changing.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Rupert Reynolds <rreyno...@cix.co.uk> Sent: Sunday, September 6, 2020 8:12 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: REXX true/false (was Constant Identifiers) To expand, I had some code monitoring input data as it arrived, waiting for a fault condition that was in several parts, order unknown. So I used a few Rexx variables as Booleans, as they made the conditional code shorter and clearer. But someone will reuse my code another day (perhaps me), and without the WWW or access to the proper Rexx docs, can I rely on '1' and '0' always being equivalent to the Boolean true and false, in every version of every interpreter and perhaps compilers as well? This was not like (say) PL/1, in which a bit(1) with the value '1'b had a precise meaning for Boolean logic, stated in a book already sat on my desk :-) Using TRUE and FALSE like constants from the top made it clear to anyone viewing it, and fairly easy to find and change in the code, if necessary. It worked, BTW. As I remember things, it found the bug before my coffee mug was empty, but a few days later they cancelled the software licence over a different, bigger bug. Ho-hum :-) Rupert On Sat., Sep. 5, 2020, 23:56 Paul Gilmartin, < 0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote: > On Sat, 5 Sep 2020 23:36:37 +0100, Rupert Reynolds wrote: > > >Writing Rexx for myself (therefore no local standards to follow) I had to > >set an internal boolean in a few places. > >So I started it with > >TRUE = (1=1) > >FALSE = \TRUE > > > Now you have them; how are they useful? (Examples?) > > >That's partly because I couldn't find doc on Rexx standards (no WWW yet) > >and I didn't like to assume that 1 and 0 were always valid :-) > > ---------------------------------------------------------------------- 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