Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: C programming style Message-ID: <4031@alice.UUCP> Date: Sat, 20-Jul-85 11:44:58 EDT Article-I.D.: alice.4031 Posted: Sat Jul 20 11:44:58 1985 Date-Received: Mon, 22-Jul-85 06:24:22 EDT References: <646@rlvd.UUCP> Organization: Bell Labs, Murray Hill Lines: 22 > As an aside, I remember being taught AlgolW as a student, where i := i + 1 > and i := 1 + i were equvalent statements, and incremented i. I then moved to > PL360 (yuk!) for a while where i := i + 1 inrements i, and i := 1 + i sets i > to 2. PL360 was unusual in that there was no operator precedence: all operators (including assignment!) grouped to the left. Thus i := 1 + i meant (1) i := 1; (2) i := i + i; Incidentally, it was possible in later versions of PL360 to increment i by simply writing i + 1; the idea being that writing an expression without an assignment would use the first operand as its implicit destination. And what about the =: operator? i + 1 =: j shl 2; means: add 1 to i, put the result in j; now shift i left 2 bits.