It's potentially confusing, and I would certainly flag it at a code review. Even if PUT were not a keyword it would be a poor choice of name. Better form would be a name that suggests not only that you did a PUT but to which file.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Tony Harminc <t...@harminc.net> Sent: Wednesday, September 2, 2020 6:38 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: A little magic from Doug Nadel On Wed, 2 Sep 2020 at 17:35, Seymour J Metz <sme...@gmu.edu> wrote: > > Knowingly means knowingly; regardless of the user's sophistication or lack > thereof; no reasonable person would expect the user to avoid unknown > keywords. OTOH, a polite heads up would be reasonable. > > However, it might be nice to have a compiler option to flag overloading of > keywords. I wouldn't call such an option pedantic, and there might be lots of > other legal constructs that you would want a message for. It depends greatly on the way strings that happen to be keywords are used not as keywords. Any beginner can write if then = if then if = end; else do = if; (or worse) just to show that yes, PL/I really doesn't have reserved words. But I see little if anything wrong with put = '1'b; ... If put then put skip list (...); else select = select + 1; or a simple example from the book that has and requires no comment about Area not being a keyword: Area = (Radius**2) * 3.1416; Tony H. ---------------------------------------------------------------------- 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