Re: # flag used with printf warning
Re: # flag used with printf warning
- Subject: Re: # flag used with printf warning
- From: Chris Espinosa <email@hidden>
- Date: Tue, 27 Apr 2004 11:01:28 -0700
On Apr 26, 2004, at 9:38 PM, Ken Turkowski wrote:
>> What OS lets you use # with %s in (s)printf? A quick Google search
>> brought back only printf man pages that say that # has no effect on
>> %s.
>> What alternate form could a string have?
>
> Pascal strings are length prefixed.
The portable way to printf a Pascal string is
printf("%*s\n", pstring[0], &pstring[1]);
Chris
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.