|
![](/i/fill.gif) |
>>> The integral part of the value is assigned to the int.
>> So... it always rounds towards zero?
>
> As long as they're both positive.
Does it round towards zero, or towards negative infinity?
>> Aren't expressions guaranteed to execute left-to-right?
>
> No. That's what the comma operator is for that you dislike so much. ;-)
Oh good. The book /insists/ that left-to-right order is guaranteed. Nice
to know that in addition to being poorly explained, it's also factually
inaccurate. :-P
>> 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.
A better way might be to think of true and false as 1 and 0. (Although
of course C allows true to be /anything/ that isn't 0, not just 1.)
>> 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.
I'm currently trying to work out how I can compile a program where
module 1 refers to module 2, but module 2 also refers to module 1. As
far as I can figure out, this is impossible...
Post a reply to this message
|
![](/i/fill.gif) |