%* format doesn't work in NSLog
%* 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 ''