Posted by Geoff Berrow on 03/21/06 15:35
Message-ID: <yYY8TIACX8HEFw1+@eminent.demon.co.uk> from Peter Fox
contained the following:
>A way to 'burn-in' mental processes in order to distinguish = and == is
>to 'say' "=" as one word and "==" as two. For example "equals" and "is
>equal" (or "equals" and "equal to") and to get into the habit of
>'saying' conditional statements using the two word form.
>$a =[equals] $b;
>if($a =[equal]=[to] $b){ ...
A better way is not to mention equals at all
= is the assignment operator
== is the comparison operator
$a=[takes the value of]$b;
if($a ==[has the same value as] $b){ ...
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
[Back to original message]
|