[futurebasic] Re: [FB] Alternate method for fill by reference

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2013 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Wed, 1 May 2013 08:27:53 -0700
On May 1, 2013, at 8:05 AM, "Edwards, Waverly" <Waverly.Edwards@...> wrote:

> I seem to recall there is a possible issue using the ".nil&" syntax, having to do with byte order.
> Maybe I'm wrong about that.

Hi Wave,

Most( such as the Carbon Core MacMemory calls ) low-level memory manipulation ( dereferencing a pointer or using BlockMoveData, memmove ) ( AFAIK ) simply moves the provided data without regard to byte order ( i.e. big-endian on PPC or little-endian on Intel ). FB Help Appendix M ( also FBtoC Help too ) has an overview of some of the endian gotchas. Apple encourages use of Core Foundation as a replacement when possible because CF handles all endian issues automatically. If your data is big endian, code will need to be aware of it either with CF or by using many of the "swap" calls available to convert from big/little ( and back ). There are many posted examples on byte swapping. Let me know if you can’t find them.

Brian S.