• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)


  • Subject: Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
  • From: Markus Hitter <email@hidden>
  • Date: Sat, 14 Jan 2006 01:04:34 +0100


Am 13.01.2006 um 22:17 schrieb Kirk Kerekes:

This is an 8-byte file consisting of a Mac-style Type and Creator.

Can anyone provide an authoritative answer as to how this is stored on OS-X/intel?

Little-endian? (Host)
Big-endian? (PPC-style)

There are so many questions of this type, here and elsewhere.


They are four single bytes, representing four characters. If you swap bytes there, you change the sequence of those characters, but not their value.


Even if you interpret them as an integer number, endianess doesn't matter as long as you don't do calculations with them. ('APPL' + 'FMWK') * 3 anybody?


Could somebody please try to explain why people think four-character constants are subject for endianess issues?



Thanks, Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
      • From: Steve Christensen <email@hidden>
References: 
 >Endian-ness of "PkgInfo" file (From: Kirk Kerekes <email@hidden>)

  • Prev by Date: Re: NSControl's not updating
  • Next by Date: Re: NSControl's not updating
  • Previous by thread: Re: Endian-ness of "PkgInfo" file
  • Next by thread: Re: Endian-ness of four-char constants (Was: Endian-ness of "PkgInfo" file)
  • Index(es):
    • Date
    • Thread