Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.misc Subject: Re: := versus == Message-ID: <:1=4K26@ggpc2.ferranti.com> Date: 4 Aug 90 19:31:24 GMT References: <1990Jul30.143530.24295@phri.nyu.edu> <25684@cs.yale.edu> <7H+4AM6@xds13.ferranti.com> <3989@rtifs1.UUCP> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 19 In article <3989@rtifs1.UUCP> trt@rti.rti.org (Thomas Truscott) writes: > I like the Q and PL/M features, but they don't stop me from typing: > a == b + 1; /* OOPS, I mean't to assign to a */ PL/M will. A naked expression is not a legal PL/M statement. You meant: a = b + a; > if (a := b) .. /* OOPS, I only wanted to compare them */ I think that is only legal is a and b are booleans. In any case, you want: if (a = b) .. Back to the point. If I was god and got to fix C, I'd make the indirection operator postfix before playing with assignment and equality. -- Peter da Silva. `-_-' +1 713 274 5180. 'U`