32bit to long?

BlitzMax Forums/BlitzMax Programming/32bit to long?

Looks like this did the trick, for future references.

Function long2bytes$(in:Long)	
  	Local b1 = (in Shr 24) Mod 256
  	Local b2 = (in Shr 16) Mod 256
  	Local b3 = (in Shr 8) Mod 256
  	Local b4 = (in Shr 0) Mod 256
	Print "hej "+b1
	Return Chr(b1)+Chr(b2)+Chr(b3)+Chr(b4)
EndFunction