Monday, June 5, 2006, 1:01:10 PM, EA Durbin wrote: >>Both of those depend on the type and not on what it "should be". >>And the type is INT it's a "signed int".
> Why must it be a signed int, the comparison is always a positive number > which is an unsigned int. So if we always pass a positive number it should > still work correctly. No it will not work correctly. What if something _will_ pass a negative number? Then instead of having it as -1 you'll have 4294967295. Can you 100% guarantee that documentation is correct? And that there are no broken apps that will try to pass negative number? > Both types are integers, only the signed int requires 2 more bytes for the > sign. > > Aren't we wasting 2 bytes of memory by using signed int? Wrong. You need to read some c books. But sign uses only 1 bit, not 2 bytes. Vitaliy.