From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,80ae9f89712e54ee X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,80ae9f89712e54ee X-Google-Attributes: gidfee84,public From: Lawrence Kirby Subject: Re: printf-problem Date: 1996/01/17 Message-ID: <821915961snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 135821631 distribution: world references: <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de> x-mail2news-path: genesis.demon.co.uk organization: none reply-to: fred@genesis.demon.co.uk newsgroups: comp.unix.osf.osf1,comp.lang.c In article <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de> wist@lam.mw.tu-muenchen.de "Henrik Wist" writes: >long int zahl; /* which is e.g. 10000500001 */ >printf("%d\n",zahl); /* gives 1410565409, which is definitly wrong */ >. >. >. > >Is that a problem of printf() or DG-UX or is it my problem that I don't know >the right conversion for printf(). Btw, printf("%u",zahl) didn't work either. >Any suggestions? RTFM. 'man printf' will almost certainly tell you that the conversion specifier for longs is %ld. -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com