Gee, that's a long way ahead of what I got out of reading K&R!
In
> So in C, casting is a language syntax
right. So, cast is just syntax but short on semantics, that is, how the conversion is actually done so that we can know the results, that is, if you will, what the heck happens.
In
6.3.1.5 Real floating types
is
> If the value
being converted is in the range of values that can be represented but cannot be
represented exactly, the result is either the nearest higher or nearest lower representable
value, chosen in an implementation-defined manner. If the value being converted is
outside the range of values that can be represented, the behavior is undefined.
So, yes, this is an example of where I'd be concerned.
On "strong typing", I always thought that the concept was poorly defined and described but never screamed bloody murder about it if only because it didn't directly affect
what my software would do. I used "strong typing" in my post if only because it seems to be what the C community likes to
do, and when in Rome do as Romans do. Or, maybe strong typing is better than weak typing or typeless -- okay by me.
Gee, that's a long way ahead of what I got out of reading K&R!
In
> So in C, casting is a language syntax
right. So, cast is just syntax but short on semantics, that is, how the conversion is actually done so that we can know the results, that is, if you will, what the heck happens.
In
6.3.1.5 Real floating types
is
> If the value being converted is in the range of values that can be represented but cannot be represented exactly, the result is either the nearest higher or nearest lower representable value, chosen in an implementation-defined manner. If the value being converted is outside the range of values that can be represented, the behavior is undefined.
So, yes, this is an example of where I'd be concerned.
On "strong typing", I always thought that the concept was poorly defined and described but never screamed bloody murder about it if only because it didn't directly affect what my software would do. I used "strong typing" in my post if only because it seems to be what the C community likes to do, and when in Rome do as Romans do. Or, maybe strong typing is better than weak typing or typeless -- okay by me.