Go Down

Topic: compiler should notice... (Read 1 time) previous topic - next topic

Gabe462

when I use the wrong operator...

if (fishyTasteInMouth = true)     // accidentally used = instead of ==

Gabe

admin

#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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy