> -----Original Message-----
> From: Marshall Clow [mailto:[EMAIL PROTECTED]]
...
> 
> 
> >Shankar Unni <[EMAIL PROTECTED]> writes:
> >
> > > Well, what is it supposed to do? Technically, according 
> to the C standard,
> > > anyway, this operation has undefined effects, because you 
> are converting a
> > > negative number ((signed long) (y - z) * 10) into an 
> unsigned number in
> > > order to add to "x". 
> >
> >Not quite. The conversion from unsigned to signed int *is* 
> well-defined.
> 
> For some implementations.

No, undefined is undefined.  This means that each implementation
is free to pick it's own way to handle it.  This of course means
that the results you get from one compiler might not match the
results you get from another.  That is what "undefined" means
when you are talking about a language standard.  The standard
does not define what the implementation should do in the given
situation, therefore the implementation can do whatever it wants
(including singing "The Star Spangled Banner").



-- 
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi./sec ... not just a good idea, it's the LAW!

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to