Re: CopyCStringToPascal
Re: CopyCStringToPascal
- Subject: Re: CopyCStringToPascal
- From: Brad Oliver <email@hidden>
- Date: Fri, 17 Jun 2005 09:51:17 -0700
On Jun 16, 2005, at 2:20 PM, email@hidden wrote:
In that case, can you recommend an alternative to DebugStr (which is
not marked as deprecated), which takes a Pascal string and outputs it
to the console?
Something to keep in mind here is that outputting to the console is
not magic. You can do so a variety of ways: printf, fprintf
(stderr,...), CFShow and DebugStr immediately spring to mind. I'm
pretty sure there are others.
With that said, you can output a pascal string to the console like so:
fprintf (stderr, "%.*s\n", pascalString[0], &pascalString[1]);
Note that this syntax is standard, if a little uncommon, and should
be usable on any decent standards-compliant compiler, gcc and
CodeWarrior included.
--
Brad Oliver
email@hidden
_______________________________________________
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