Subject: Re: printf() in combination with long long
From: [email-masked] (Stefan Briesenick)

14 Jan 1999 15:26:58 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Horak Daniel <[email-masked]>, cygwin <[email-masked]>

Hello!

> > try this:
> >
> > #include <stdlib.h>
> >
> > int main(void)
> > {
> >    unsigned long long var1, var2, var2;
> >
> >    var1 = 12345;
> >    var2 = 54321;
> >    var3 = 98765;
> >
> >    printf("wrong: %Lu - %Lu - %Lu\n",var1,var2,var3);
> 
> I think, that here should be %lld or %q. I have tried the %lld and it works
> in printf.

hmm. On my Linux machine and with emx-os/2, its %Ld (signed long long) and
%Lu (unsigned long long). If I read the manpages right of our HP-UX
machine, it's the same.

cygwin knows %Lu and %Ld. And it works for the defined value range of
64-Bit. But: it has the stack-problem!

Ok, I'll try %lld and %llu. But then it's not compatible to my other
compilers... :-(

> But the newlib C library cannot "read" long long. There is no support in
> vsscanf and strtol. Is anybody working on this?

in emx there's _strtoll and _strtoull. Should be the same then (with
cygwin)...

Stefan Briesenick
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".