View Single Post
Old 03-01-2017, 08:03 AM   #87 (permalink)
t vago
MPGuino Supporter
t vago's Avatar
Join Date: Oct 2010
Location: Cedar Rapids, IA
Posts: 1,766

The Karen-Mobile - '05 Dodge Magnum SXT
Team Dodge
90 day: 26.72 mpg (US)

Fiat Dakota - '00 Dodge Dakota SLT RWD Quad Cab
90 day: 16.67 mpg (US)

The Red Sled - '01 Dodge Durango SLT 4WD
90 day: 16.96 mpg (US)
Thanks: 799
Thanked 681 Times in 437 Posts
And for clarity, when I say "conditional," I mean

If (some comparison performed between value 1 and value 2 happens to be true) then

    (do something)


    (do something else)

end if
In C++, it's quite possible to stuff value 1 and/or value 2, with an assignment statement that contains a computation, within the if-then construct itself, like so:

if ((unsigned int a = 3 * b + c) == 4) doSomething;
It's certainly valid for C++, but it's frowned upon because it's not all that readable and can lead to very subtle bugs due to programmers mistakenly using "=" when they meant to type "==".
The Fiat Dakota

The Karen-mobile

The Red Sled
  Reply With Quote