[ECOS] Problems with printf and long long int

Andrew Lunn andrew@lunn.ch
Fri Oct 7 12:54:00 GMT 2005


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



More information about the Ecos-discuss mailing list