• 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
Re: long long int
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: long long int


  • Subject: Re: long long int
  • From: "Kenneth C. Dyke" <email@hidden>
  • Date: Sun, 20 Jan 2002 12:35:20 -0800

On Sunday, January 20, 2002, at 10:58 AM, Gerriet M. Denkmann wrote:

Thanks to Nat! and to Kenneth Dyke, email@hidden (personal), email@hidden (work)
I have got this thing to work.

Except that I got it wrong. I forgot that q was just a modifier. My bad, but glad you got it working.


The correct form is:

unsigned long long ul64 = 0x12312345678ULL ;
unsigned long ul32 = 0x87654321UL ;

NSLog(@"ul64 %#qx ul32 %#x", ul64, ul32);
printf("ul64 %#qx ul32 %#lx\n", ul64, ul32);

And I checked again man printf, and did not find the q(long long - working), nor the l (long) or L (long long - not working) modifiers.

So there are actually two bugs:
1. man printf

Try doing "man 3 printf". The man page you get with just doing "man printf" is for /usr/bin/printf.

-Ken

Kenneth Dyke, email@hidden (personal), email@hidden (work)
Sr. Mad Scientist, MacOS X OpenGL Group, Apple Computer, Inc.
Java: The blazing speed of SmallTalk with the simple elegance of C++.


References: 
 >Re: long long int (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Stuck with NSURL
  • Next by Date: Re: How to choose file without extension in NSOpenPanel
  • Previous by thread: Re: long long int
  • Next by thread: Re: long long int
  • Index(es):
    • Date
    • Thread