this can't be done in DarkBasic standard/enhanced... atleast not easily, or to any decent level of accuracy.
function BitRight( In, Step )
result = In/(2^Step)
endfunction result
function BitLeft( In, Step )
result = In*(2^Step)
endfunction result
you use them like so... say you need 2 word values combined into a dword
word = 65535 max
dword = 4,294,967,295 (but in db is an integer which is -2147483647 -> 2147483647)
and you'd use it like
result = BitLeft(int(floatZ#),8)+(int(floatX#))
floatZ# = BitRight(result,8)*1.0
floatX# = (result - int(floatZ))*1.0

as long as the value provided are under 255.0 you'll be fine with that...
to find out what you can actually fit into how many bytes do with
sqrt(int(fValue))
for 255.0 you'll return an 8 so thats the stepping you take
Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?