discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNumber Bug


From: Andreas Höschler
Subject: NSNumber Bug
Date: Mon, 27 Oct 2008 15:12:41 +0100

Hi all,

The following code

      double value = 29.84;
      NSNumber *num = [NSNumber numberWithDouble:value];
NSDecimalNumber *result = [NSDecimalNumber decimalNumberWithDecimal:[num decimalValue]];
      NSLog(@"value %f num %@ result %@", (float)value, num, result);

gives me

        value 29.840000 result 29.84 result 29

after doing

        defaults write NSGlobalDomain NSDecimalSeparator ","

The after comma digits get lost!? Without this default everything is fine!? Any idea?

Thanks,

  Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]