This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: printf("%d,%ld",a,b); always prints unsigned
- From: Bob Holmberg <bob_holmberg at yahoo dot com>
- To: "Gary D. Thomas" <gary dot thomas at mind dot be>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 16 May 2003 14:52:00 -0700 (PDT)
- Subject: Re: [ECOS] printf("%d,%ld",a,b); always prints unsigned
Gary,
== The program:
#include <cyg/infra/diag.h>
int
main(void)
{
int a = -1;
long b = -1;
diag_printf("Should show -1 --> %d, %ld\n",a,b);
}
== gives the results:
Should show -1 --> -1,-1
==
It's different than when I use printf.
I guess that's a work-around for now.
-- Bob H
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss