Jesse #1 this is simpler: function long2bytes$(in:long) return hex(in) end function Untested, Might not be faster.