Re: Need a hand with a small C conversion

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

here is some functions for splitting ints into hi and lo.


global function lo_word( atom a )


syntax: i = lo_word( a )

description: returns the low word(2 bytes) i, from the long(4 bytes) a

return low word return and_bits( a, #FFFF ) end function


global function hi_word( atom a )


syntax: i = hi_word( a )

description: returns the high word(2 bytes) i, from the long(4 bytes) a

return high word return and_bits(floor( a / #10000 ), #FFFF) end function

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

Search



Quick Links

User menu

Not signed in.

Misc Menu