Re: EndianU32_NtoB
Re: EndianU32_NtoB
- Subject: Re: EndianU32_NtoB
- From: "Sean McBride" <email@hidden>
- Date: Fri, 30 Oct 2009 20:37:50 -0400
- Organization: Rogue Research Inc.
On 10/30/09 5:20 PM, Kyle Sluder said:
>On Fri, Oct 30, 2009 at 10:31 AM, Sean McBride <email@hidden>
>wrote:
>> Ah yes, I forgot about those... But I've found them not useful in
>> practice. I don't get why for ints they have host<->big, host<->little,
>> etc. for the floats they don't. Instead they have those weird host<-
>>>swapped. And though they take floats, they return structs. Odd.
>
>Probably because the intent is to use them for network communication
>or other serialization. So you "encode" a float into a Swapped struct
>on the way out, and "decode" it back into a float on the other end.
If so, then when the docs say:
"CFConvertFloatHostToSwapped
Converts a 32-bit float from the host's native byte order to a platform-
independent format"
I guess 'platform-independent format' is code for big endian.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden