An early version of ASCII had some code points with dual assignments of characters, and included left and up arrows.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Paul Gilmartin [[email protected]] Sent: Wednesday, March 30, 2022 8:28 AM To: [email protected] Subject: Re: PL/I question On Wed, 30 Mar 2022 19:50:12 +0800, David Crayford wrote: >> >> That may well be. I stand by my claim that it is a common source of errors. > >I agree. Which is why a lot of C programmers used to used to code if >statements with no lvalues: > >if (3 = foo) ... > A similar practice applies to Shell test. Code: if [ 3 = $foo ] ... rather than: if [ $foo = 3 ] ... lest $foo evaluate to a unary operator. The habit of writing the constant on the right may come from natural languages where "is" can denote either identity or set membership. I favor ":=", a typographically asymmetric operator for a semantically asymmetric operation. It's unfortunate that ASCII doesn't contain "←". Some languages assign rightward -- "GIVING or "→". -- gil ---------------------------------------------------------------------- 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
