Jesus and his HEX Number Problem {Rob??}
- Posted by Hawke <mdeland at NWINFO.NET> Jul 03, 1998
- 661 views
after reading jesus' last post about hexadecimal constants, i thought he might be using %f in printf and i also wondered what would happen if instead of using 'constant' that he defined his constants as 'integers' and assigned them values and so i whipped up the following: ------------------------------- constant testnum = #FFFFFFFF integer testnum2 testnum2 = #FFFFFFFF printf(1, "%d\n",testnum) printf(1, "%d\n",testnum2) ------------------------------- here is the output: ------------------------------- C:\blah>ex test test.ex:3 type_check failure, testnum2 is 4.29497e+009 --> see ex.err C:\blah>type ex.err test.ex:3 type_check failure, testnum2 is 4.29497e+009 Global & Local Variables test.ex: testnum2 = 4.29497e+009 ------------------------------- ummmmm hello? ummmm testnum2 is *declared* to be *integer*.... are Jesus and I both screwed up? or... well i don't wanna think about the or... anyone? <Stumped>Hawke'</Stumped>