Well, they may not be reserved, if you say so.  But I think I'd be a fool to 
try using "is", "if" or "in" as a loop counter, certainly for the sake of the 
programmer who inherits my work but I'm sure it would confuse me too.

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

/* When a man is getting better he understands more and more clearly the evil 
that is still left in him.  When a man is getting worse, he understands his own 
badness less and less.  A moderately bad man knows he is not very good; a 
thoroughly bad man thinks he is all right.  This is common sense, really.  You 
understand sleep when you are awake, not while you are sleeping.  You can see 
mistakes in arithmetic when your mind is working properly; while you are making 
them you cannot see them.  You can understand the nature of drunkenness when 
you are sober, not when you are drunk.  Good people know about both good and 
evil; bad people do not know about either.  -C S Lewis, _Christian Behavior_ */

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Rony G. Flatscher
Sent: Saturday, April 20, 2024 13:51

There are *no* reserved words in Rexx like in many other languages. (This 
alleviates one to have to learn them by heart. But more importantly, should the 
language get additional keywords over time they would not break existing Rexx 
programs that happen to use them already, unlike other programming languages.)

> --- On Sat, 20 Apr 2024 11:08:03 -0400, Bob Bridges wrote:
>> It was while I was coding in REXX that I tried abutting a variable 
>> named 'x' with another string, and couldn't figure out why the 
>> program behaved as it did.  Eventually figured out I had 
>> inadvertently created a hex constant.  Maybe as an overreaction, I 
>> have never since used one-character variable names, always two or 
>> more.  (What do I use for loop counters?, you ask.  I use 'j' plus 
>> another letter; 'jr' for records, for example, 'jd' for days 
>> whatever.  More obvious would have been 'i', but there are too many 
>> two-letter reserved words even in REXX that start with 'i'.)
> I like to use longer names with mnemonic value as control variables 
> and, if the body of the loop is more than a couple lines, cite the 
> control variable at the END so the interpreter verifies nesting.

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