[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One quick question in Objective C
From: |
Pascal Bourguignon |
Subject: |
Re: One quick question in Objective C |
Date: |
Wed, 17 Oct 2001 20:23:32 +0200 (CEST) |
> Date: Wed, 17 Oct 2001 11:34:23 +0530
> From: "ramana rao" <nalluri@orillion.com>
>
>
> Hi,
>
> One quick question in OBjective C,
>
> In NSlog or in printf, to print a variable we give type specifier like
>
> %d for "int"
> %ld for "long int"
> %f for "float" or "double"
>
> what? for "long long"
>
> does any body have idea which type specifier should we use to print "long
> long" variable
>
>
> thanks for any help i may get
>
>
> Ramana Rao
On my Linux, man fprintf gives:
[...]
The length modifier
Here, `integer conversion' stands for d, i, o, u, x, or X
conversion.
[...]
ll (ell-ell). A following integer conversion correĀ
sponds to a long long int or unsigned long long int
argument, or a following n conversion corresponds
to a pointer to a long long int argument.
[...]
I would try NSLog(@"long long is: %lld\n",(long long)42);
--
__Pascal_Bourguignon__ (o_ Software patents are endangering
() ASCII ribbon against html email //\ the computer industry all around
/\ and Microsoft attachments. V_/ the world http://lpf.ai.mit.edu/
1962:DO20I=1.100 2001:my($f)=`fortune`; http://petition.eurolinux.org/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d? s++:++(+++)>++ a C+++ UB+++L++++$S+X++++>$ P- L+++ E++ W++
N++ o-- K- w------ O- M++$ V PS+E++ Y++ PGP++ t+ 5? X+ R !tv b++(+)
DI+++ D++ G++ e+++ h+(++) r? y---? UF++++
------END GEEK CODE BLOCK------