Arduino Forum
>
Forum 2005-2010 (read only)
>
Software
>
Bugs & Suggestions
>
compiler should notice...
Print
Go Down
Pages:
[1]
Topic: compiler should notice...
(Read 2450 times)
previous topic
-
next topic
Gabe462
Guest
compiler should notice...
May 19, 2006, 09:53 am
when I use the wrong operator...
if (fishyTasteInMouth = true) // accidentally used = instead of ==
Gabe
admin
Guest
Re: compiler should notice...
#1
May 19, 2006, 12:57 pm
Last Edit
: May 19, 2006, 12:59 pm by admin
Reason
: 1
no...
that's perfectly valid in C... maybe not desireable but valid
usually I tell my students to use
if (true == FishyTasteInMouth) ....
so if by mistake you use = the compiler will complain
massimo
Print
Go Up
Pages:
[1]
Loading...