Jesus and his HEX Number Problem {Rob??}

new topic     » topic index » view thread      » older message » newer message

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>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu