Code Select
[code]copy memory is really usefull, especially for filling vb types which can be build alot like cstructs
double = 8bytes
long = 4bytes
integer = 2bytes
byte = 1byte
to answer your question, without copymem that function looks like
function long2str(byval n as long) as stringlong2str = _
chr((n and &HFF000000&) mod 256) & _
chr((n and &H00FF0000&) mod 256) & _
chr((n and &H0000FF00&) mod 256) & _
chr(n and &H000000FF&)
end function[/code]
or backwards... dont know offhand, too lazy for testing!