• 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
%* format doesn't work in NSLog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

%* format doesn't work in NSLog


  • Subject: %* format doesn't work in NSLog
  • From: "Simson Garfinkel" <email@hidden>
  • Date: Sat, 8 Dec 2001 12:09:24 -0500

Has anybody noticed this other than me?

Here is the test program:

#import <Cocoa/Cocoa.h>

main()
{
int i;

for(i=0;i<10;i++){
printf("i=%d '%*s'\n",i,i,"");
NSLog(@"i=%d '%*s'\n",i,i,"");

}
}

Here is the result:

[simsong@localhost ~/SBook5] 320 % ./bug
i=0 ''
2001-12-08 12:09:14.441 bug[1876] i=0 ''
i=1 ' '
2001-12-08 12:09:14.442 bug[1876] i=1 ''
i=2 ' '
2001-12-08 12:09:14.442 bug[1876] i=2 ''
i=3 ' '
2001-12-08 12:09:14.442 bug[1876] i=3 ''
i=4 ' '
2001-12-08 12:09:14.442 bug[1876] i=4 ''
i=5 ' '
2001-12-08 12:09:14.443 bug[1876] i=5 ''
i=6 ' '
2001-12-08 12:09:14.443 bug[1876] i=6 ''
i=7 ' '
2001-12-08 12:09:14.443 bug[1876] i=7 ''
i=8 ' '
2001-12-08 12:09:14.443 bug[1876] i=8 ''
i=9 ' '
2001-12-08 12:09:14.443 bug[1876] i=9 ''


  • Follow-Ups:
    • Re: %* format doesn't work in NSLog
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: Re: NSWindowWillCloseNotification problem
  • Next by Date: Re: %* format doesn't work in NSLog
  • Previous by thread: Re: NSWindowWillCloseNotification problem
  • Next by thread: Re: %* format doesn't work in NSLog
  • Index(es):
    • Date
    • Thread