Re: QC Report on Swap Function



Lars wrote:
> True but why no have a swap there is working on 4 byte variables ?
> For the next version of delphi we can make some new functions for
> borland.

A truly useful family of swapping functions should include
ByteSwap16,-24,-32,-48,-64
I've long ago "rolled my own" for all of the above, but better and faster
implementations are always welcome!

Byte-swapping functions should IMO not be overloaded, as the specific data
representation is inherently important; so the programmer should be explicit
about the exact swap being done. Anyway, the compiler couldn't distinguish
between 24 and 32 bit input, or 48 and 64 bit input, for that matter.

--
Kristofer


.