|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Nov 29, 2005, at 8:43 AM, alex wrote:
That is correct.
The 'pascal' keyword actually became a no-op in the transition to PowerPC more than ten years ago. It specified whether arguments should be pushed on the calling stack in left-to-right or right-to-left order. Because PowerPC passes function arguments in registers, 'pascal' is meaningless in the PowerPC ABI.
You could consider it that if you wish.
That's its primary purpose.
Not so magically: that is the language definition.
No such luck:
Str255 theString = "My \pPascal String";
"y pPascal String" (followed by garbage)
That is, the first (length) byte is 0x4d (ASCII "M") and the backslash-p escapes to a lowercase "p".
So if you want to use Pascal string constants, the \p must be at the beginning of the string, or it is ignored and treated like a C string.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
|>Re: How to rename the volume name of a USB flash memory stick? (From: Laurence Harris <email@hidden>)|
|>"\pPascal strings again" (From: alex <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.