format string for long long 
Author Message
 format string for long long

I'm using high-res time and would like to be able to display results
easily.  Is there a formatting character such as %l that I could use to
display a long long (hrtime_t)?

Thanks in advance.
John



Sat, 25 Oct 2003 12:30:44 GMT  
 format string for long long
try: %lld

eg:
      1 #include <stdio.h>
      2
      3 int main(int nargs, char *args[]) {
      4   long long x = 234234324234234;
      5   printf("long long x: %lld\n", x);
      6   return 0;
      7 }

gskc

Quote:

> I'm using high-res time and would like to be able to display results
> easily.  Is there a formatting character such as %l that I could use to
> display a long long (hrtime_t)?

> Thanks in advance.
> John



Sat, 25 Oct 2003 12:45:18 GMT  
 format string for long long
John Kramer a crit dans le message ...
|I'm using high-res time and would like to be able to display results
|easily.  Is there a formatting character such as %l that I could use to
|display a long long (hrtime_t)?

"%ll"

--
-hs-    "spaces, not tabs" email: emdel at noos.fr
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://secure.dinkumware.com/htm_cl/
FAQ de FCLC : http://www.isty-info.uvsq.fr/~rumeau/fclc



Sat, 25 Oct 2003 16:59:52 GMT  
 format string for long long

|John Kramer a crit dans le message ...
||I'm using high-res time and would like to be able to display results
||easily.  Is there a formatting character such as %l that I could use
to
||display a long long (hrtime_t)?
|
|"%ll"

Too early in the morning...

"%lld"

--
-hs-    "spaces, not tabs" email: emdel at noos.fr
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://secure.dinkumware.com/htm_cl/
FAQ de FCLC : http://www.isty-info.uvsq.fr/~rumeau/fclc



Sat, 25 Oct 2003 17:02:15 GMT  
 format string for long long

Quote:
>I'm using high-res time and would like to be able to display results
>easily.  Is there a formatting character such as %l that I could use to
>display a long long (hrtime_t)?

In C99, it's %lld.  But since you probably don't have a C99
implementation, better check your documentation.

Dan
--
Dan Pop
CERN, IT Division

Mail:  CERN - IT, Bat. 31 1-014, CH-1211 Geneve 23, Switzerland



Sat, 25 Oct 2003 21:33:50 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. short/long/long long Formatting questions

2. char size (was long long long long long int)

3. long long long long integers

4. convert string to long, and long to string

5. format specifier for unsigned long long

6. Long long and long double

7. Need function to convert float/double/long to string using a specified format

8. formatting long strings using sprintf()

9. formatting long strings using sprintf() without including tabs or newlines

10. path converter from 8.3 format to long format

11. REPOST: Re: Neo Longest ThrREPOST: Re: Neo Longest ThrREPOST: Re: Neo Longest ThrREPOST: Re: Neo Longest Thread Ever II

12. REPOST: Re: Neo Longest ThrREPOST: Re: Neo Longest ThrREPOST: Re: Neo Longest ThrREPOST: Re: Neo Longest Thread Ever II

 

 
Powered by phpBB® Forum Software