Re: converting from decimal to hexadecimal

2008-09-02 Thread Ronnie B
That was it. Thanks Gregory. On Tue, Sep 2, 2008 at 2:08 PM, Gregory Weston <[EMAIL PROTECTED]> wrote: > On Sep 2, 2008, at 2:04 PM, Ronnie B wrote: > > Ok. In my code I have this: >>NSString *str = [NSString stringWithFormat:@"%x", [NSNumber >> numberWithInt:12345]]; >>NSLog(@" --- he

Re: converting from decimal to hexadecimal

2008-09-02 Thread Gregory Weston
On Sep 2, 2008, at 2:04 PM, Ronnie B wrote: Ok. In my code I have this: NSString *str = [NSString stringWithFormat:@"%x", [NSNumber numberWithInt:12345]]; NSLog(@" --- hex or not %@", str); in a concole I see this: --- hex or not 5c633d0 But, in Calculator.app I see this: 0x3039

Re: converting from decimal to hexadecimal

2008-09-02 Thread Ronnie B
Ok. In my code I have this: NSString *str = [NSString stringWithFormat:@"%x", [NSNumber numberWithInt:12345]]; NSLog(@" --- hex or not %@", str); in a concole I see this: --- hex or not 5c633d0 But, in Calculator.app I see this: 0x3039 What i am doing wrong? On Tue, Sep 2, 2008 at 1:5

Re: converting from decimal to hexadecimal

2008-09-02 Thread Gregory Weston
Ronnie B wrote: Hello, Is there an easy way to convert a decimal number to hexadecimal. NSNumberFormatter does not have an api for that. Any advice. Depends on what you mean. The words "decimal" and "hexadecimal" don't have any implications beyond the presentation of data. In memory, int

Re: converting from decimal to hexadecimal

2008-09-02 Thread David Duncan
On Sep 2, 2008, at 9:45 AM, Ronnie B wrote: Is there an easy way to convert a decimal number to hexadecimal. NSNumberFormatter does not have an api for that. Any advice. See the formatting methods on NSString:

Re: converting from decimal to hexadecimal

2008-09-02 Thread Shawn Erickson
On Tue, Sep 2, 2008 at 9:45 AM, Ronnie B <[EMAIL PROTECTED]> wrote: > Is there an easy way to convert a decimal number to hexadecimal. > NSNumberFormatter does not have an api for that. Any advice. 'man 3 printf' in terminal and look for the "x" and "X" conversion specifiers You can use those w

converting from decimal to hexadecimal

2008-09-02 Thread Ronnie B
Hello, Is there an easy way to convert a decimal number to hexadecimal. NSNumberFormatter does not have an api for that. Any advice. Thanks, R. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm