K
Kenneth Brody
Does the cast "(unsigned)" imply "(unsigned int)", or does it simply
strip the signedness from the variable?
In other words, given this:
long l = -123;
unsigned long ul = (unsigned)l;
Does the value of "l" get demoted to an unsigned int during the
assignment, or does it remain a long? (I am on a system where
sizeof int == sizeof long, so examining the generated code doesn't
help me out here.)
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
strip the signedness from the variable?
In other words, given this:
long l = -123;
unsigned long ul = (unsigned)l;
Does the value of "l" get demoted to an unsigned int during the
assignment, or does it remain a long? (I am on a system where
sizeof int == sizeof long, so examining the generated code doesn't
help me out here.)
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>