Path: utzoo!utgpu!water!watmath!clyde!burl!codas!ateng!chip From: chip@ateng.UUCP (Chip Salzenberg) Newsgroups: comp.lang.c Subject: Re: == vs = Message-ID: <166@ateng.UUCP> Date: 26 Jan 88 15:47:33 GMT References: <626@PT.CS.CMU.EDU> <214@oink.UUCP> <2681@mmintl.UUCP> Reply-To: chip@ateng.UUCP (Chip Salzenberg) Organization: A T Engineering, Tampa, FL Lines: 24 In article <2681@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: > >I would then introduce a new operator, perhaps :=, for the relatively >rare assignment where the result is used. > >In other words, the type of an expression whose main operator is = is void. This idea is similar to Intel's PL/M (specifically, PL/M-86): Symbol Use Example ------ ------------------- ------------------------------------- = assignment FOO = BAR; = equality IF FOO = BAR THEN CALL BARF(1); := imbedded assignment IF (FOO := BAR) = XYZZY THEN CALL BARF(2); Personally, I dislike PL/M's choice of symbols, which makes imbedded assignment look like a bag off the side of the language -- which, in this case, it is. But maybe ANSI will buy it now that you can show prior art. :-) -- Chip Salzenberg UUCP: "{codas,uunet}!ateng!chip" A T Engineering My employer's opinions are a trade secret. "Anything that works is better than anything that doesn't."