|
|
On 4/17/2012 7:04, Invisible wrote:
>> The integral part of the value is assigned to the int.
> So... it always rounds towards zero?
As long as they're both positive.
> Aren't expressions guaranteed to execute left-to-right?
No. That's what the comma operator is for that you dislike so much. ;-)
> always struggle to remember whether zero means true or false. The solution,
You're aware that boolean math matches up with + and * right? So remember it
that way.
> From what I'm seeing, just having multiple compilation units is a
> nightmare.
Multiple compilation units is only a nightmare when each can't refer to any
other compilation units. The problem isn't that there's multiple compilation
units, which pretty much every modern language above assembler supports. The
problem is that xyz.c can't refer to abc.c, so it needs to recompile abc.h
in order to know what's in abc.c, which of course can get out of sync
because they're separate compilation units.
If you could #include <abc.o> you'd get rid of all the silliness of
declaring inline functions multiple times, function prototypes, and all that
kind of BS.
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
|