This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Problems with printf and long long int
On Fri, Oct 07, 2005 at 02:42:05PM +0200, Yegor Yefremov wrote:
> Hi,
>
> I've define long long int variable and try to print its value. In
> uClinux I use %d or %ld and get the value without a problem. In eCos I
> see only zero. The value can contain one digit or more it doesn't
> matter.
Your uClinux code is broken....
>From the man page for printf...
ll (ell-ell). A following integer conversion corresponds 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.
and you can find the standard at
http://www.opengroup.org/onlinepubs/009695399/functions/printf.html
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss