Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I output FourCharCode variable as text?



On 11/27/03 7:31 AM, Jim Hamilton wrote:
> I can break that!
>
> Print(0x30004142);
>
> would be rendered as "0".

If it breaks, don't do that!

The FourCharCode type is for four character codes, as you can tell by the
name. This is not a user input type where we need to handle extreme and
nonsensical values. It is a type created by developers for developers. All
we need to do is establish a reasonable convention and follow it. A simple
hack allows using the type to convey numbers up to 538976287 (0x2020201F).
That is a lot of numbers. If that is not enough for your application, use a
different type, such as UInt32 or CFStringRef.

Regards,

Tom

--
Tom Becker "Within C++, there is a much smaller and
Object-Oriented Propeller Head cleaner language struggling to get out."
<email@hidden> -- Bjarne Stroustrup
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How do I output FourCharCode variable as text? (From: Jim Hamilton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.