• 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: # flag used with printf warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: # flag used with printf warning
      • From: Paul Russell <email@hidden>
    • Re: # flag used with printf warning
      • From: Ricky Sharp <email@hidden>
References: 
 >Re: # flag used with printf warning (From: Ken Turkowski <email@hidden>)

  • Prev by Date: Re: XCode 1.2 Release Notes incorrect re: agvtool?
  • Next by Date: Re: FAQ: Compile problems when multiple headers in project have same name
  • Previous by thread: Re: # flag used with printf warning
  • Next by thread: Re: # flag used with printf warning
  • Index(es):
    • Date
    • Thread