• 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
Re: deprecated FOUR_CHAR_CODE and macintel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deprecated FOUR_CHAR_CODE and macintel


  • Subject: Re: deprecated FOUR_CHAR_CODE and macintel
  • From: Eric Albert <email@hidden>
  • Date: Fri, 20 Jan 2006 11:34:55 -0800

On Jan 20, 2006, at 10:55 AM, Lawrence Gold wrote:

On Jan 20, 2006, at 11:40 AM, Lawrence Gold wrote:

On Jan 12, 2006, at 4:46 PM, Andy O'Meara wrote:

Yeah, every compiler I've ever seen, even back into the Win16 days,
multi-char literals are just a convenience representation for for hex
literals (left to right denotes most sig to least sig). Lawrence, perhaps
you're just misspeaking? ( 'APPL' >> 24 ) will get you 'A' no matter if
you're on MSVC, CW, gcc, or you name it. The only exception I've ever heard
of is that Borland used to have a compiler option where char literals are
understood to read from least to most sig.

Well I'll be damned, it seems to be working correctly now, at least for a little test I put together. I'll have to look into this further, because I swear the byte order was reversed when I first look at it. It'd be really nice to get rid of the ugly macros. :-)

And to follow up, it turns out there is a problem, but only for a special case. One of our constants is


	'\0\0\e\0'

which ends up being stored in the wrong order. Regular constants with characters in all the positions work fine.

'\0\0\e\0' is 0x00001b00 for me on both Intel and PowerPC, so it seems to work correctly.


-Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: deprecated FOUR_CHAR_CODE and macintel (From: "Andy O'Meara" <email@hidden>)
 >Re: deprecated FOUR_CHAR_CODE and macintel (From: Lawrence Gold <email@hidden>)
 >Re: deprecated FOUR_CHAR_CODE and macintel (From: Lawrence Gold <email@hidden>)

  • Prev by Date: Re: Only Link In Essential Symbols
  • Next by Date: Re: Exception on a simple arithmetic problem
  • Previous by thread: Re: deprecated FOUR_CHAR_CODE and macintel
  • Next by thread: Re: deprecated FOUR_CHAR_CODE and macintel
  • Index(es):
    • Date
    • Thread