|Syntactic Confectionery Delight|
Re: CGI problemby liverpole (Monsignor)
|on Nov 06, 2011 at 14:36 UTC||Need Help??|
"...the '==' has to be used for numeric and 'eq' in case of strings."
Yes, '==' for numeric, 'eq' for strings, and '=' for assignments.
Years ago, I learned a good trick for avoiding this kind of error:
when, in fact, you meant to say:
If you get in the habit of always putting the constant on the left side of the '==' sign:
then, if you accidentally drop one of the '=', you'll get an error:
I don't usually make the mistake of writing '=' where I meant '==', but whenever I do, thanks to putting the constant on the left side, the compiler now let's me know about it in no uncertain terms!