Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

OPEN STANDARDS, NOT OPEN SOURCE

Name: Anonymous 2011-11-17 20:28

OPEN STANDARDS, NOT OPEN SOURCE

Name: Anonymous 2011-11-19 1:22

>>23
Binary zeroes means all-bits-zero ((unsigned char)0) as opposed to zero characters ('0'), or integers/floating-point numbers that compare equal to zero, but are not all-bits-zero (such as -0.0 or an integer with non-zero padding bits). In a standard, this is important because developers could interpret unqualified "zero" as 0x30, 0xF0, or 0x80000000, and not be incorrect.

Name: Anonymous 2011-11-19 2:57

>>25
Retarded logic. Do they know about context or common sense?

Name: Anonymous 2011-11-19 3:11

>>26

The thing is is that there are many contexts for the number zero, '0', +0.0, -0.0, and then there are also different representations of zero based upon what the cpu is using for integer arithmetic. It could be unsigned, or signed using 2's compliment, in which case a zero value would be binary zero. Or it could be signed magnitude, where one bit is reserved to represent sign and the rest of the bits represent the absolute value of the number. In this case, there is both a negative and a positive version of zero, both having distinct representations in binary. It is good to establish which zero you are talking about, like a block of all zeroed bits, to avoid ambiguity.

Name: Anonymous 2011-11-19 3:37

>>27
Just define context to be __int32.

Name: Anonymous 2011-11-19 3:48

>>28

but if the architecture uses sign magnitude for 32 bit integer arithmetic, then -0 = 0x80000000 could be zero. It is still ambiguous in that case.

Name: Anonymous 2011-11-19 5:02

>>28
int32_t foo = '0000';
It's an int32 containing all zeroes. Problem?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List