While PL/I has no reserved words, it is considered bad form to use a keyword as an entry or variable name. The same principle applies to Rexx; using, e.g., DO, ELSE, END, EXIT, IF, ITERATE, OTHERWISE, PROCEDURE, THEN, WHEN, as a variable name can make the code hard to read.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Robin Vowels <[email protected]> Sent: Sunday, April 21, 2024 5:08 AM To: [email protected] Subject: Re: REXX vs other languages On 2024-04-21 04:22, Paul Gilmartin wrote: > On Sat, 20 Apr 2024 19:50:56 +0200, Rony G. Flatscher wrote: >> ... >> 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 >> > I disagree. Although it's context-sensitive. But ITERATE and LEAVE > are > keywords within DO loops, Are you confusing reserved words and keywords? Keywords can be reserved words that cannot be used for other purposes, as in COBOL. In some languages, such as PL/I, keywords still have a meaning in the language, but can be used for other purposes such as identifiers. Such words are not reserved words. > which may not be intuitively obvious. Otherwise > they would be commands. RETURN is generally a keyword. And THEN > is a keyword in an IF. > >> they would not break existing Rexx programs that happen to use them >> already, > unlike other programming languages.) >> > Not true. When I first learned Rexx, A='XYZ'B was legal. Later, it > became > a syntax error. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
