Path: utzoo!utgpu!attcan!uunet!ingr!brooke From: brooke@ingr.com. (Brooke King) Newsgroups: comp.lang.misc Subject: Re: colon-equal vs equal Message-ID: <3316@ingr.com.> Date: 30 Dec 88 00:12:47 GMT References: <3300001@uxg.cso.uiuc.edu> <2286@garth.UUCP> Reply-To: brooke@ingr.UUCP (Brooke King) Organization: Intergraph Corp. Huntsville, AL -- but opinions are all mine! Lines: 34 In article <2286@garth.UUCP> smryan@garth.UUCP (Xxxxxx Xxxx) writes: | >How did the := come into being in languages like Algol, Pascal, and Ada? | | IAL 58. | | >I still prefer the way it is in C (and a little lesser so in Rexx and | | Booooo! Hisssss! | | It's all in how you read it. I read `a:=b' as `a becomes b' not `a equals b.' | `a equals b' is `a=b.' I read C's "a = b" and Pascal's "a := b" as "a receives b," "a receives b's value" or "a receives the value of b." I usually stick with "a receives b." I read C's "a == b" and Pascal's "a = b" as "a is b." In C, I make use of the preprocessor to avoid accidental "=" where I mean "==" -- I always use "IS" (# define IS ==) instead of "==" so I haven't made that mistake in seven years (the length of time I have been using the trick). No, it isn't original; a friend used a similar trick. I also use "ISNT" for "!=", "NOT" for "!", "AND" for "&&", and "OR" for "||". They all make reading logical expressions rather natural. They also help me avoid my mistyping bitwise {"&" "|"} operators for logical {"&&" "||"} operators and vice versa. | So what about the shift-key? We're all touch-typists, rught? I am, Mr. Ryan, but many of our coworkers are not. :-) ^^^^^ -- brooke@ingr.com uunet!ingr!brooke W+1 205 7727796 H+1 205 8950824