I have finished porting our backend system to gnustep. Our system
makes use
of NSNumber's description method quite a lot. I am sorry to say but
this
returns total garbage from an implementation point of view. If I
construct
a
number from a float ie [NSNumber numberWithFloat:1.5] the description
method
returns "0.0000000" which is definitely not 1.5. If I construct a
number
from a short ie [NSNumber numberWithShort:25] the description method
returns
"-1073807335".
After futher investigation I found that numberWithFloat: does indeed
work
correctly, I initially did this in gdb and it seems that something went
wrong there. The numberWithShort: does give wrong results.
I did the following:
str = [NSString stringWithFormat:@"%hd",25];
printf("%s",[str cString]);
This yielded:
-1073807335
printf("%hd",25); yielded:
25
The %hd i took from the NSNumber descriptionWithLocale: method.
Where can I find futher information on this, I am temporarily changing
the
formatting in NSNumber to be %d instead of %hd.