delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/05/22:55:16

Xref: news2.mv.net comp.os.msdos.djgpp:3473
From: akroev AT sn DOT no (Arne Knut Roev)
Newsgroups: comp.os.msdos.djgpp
Subject: Error in printf()-documentation (djgpp v2)...
Date: 6 May 1996 00:34:24 +0200
Organization: SN Internett
Lines: 21
Message-ID: <ZoSjxg8CVolV090yn@sn.no>
NNTP-Posting-Host: sinsen.sn.no
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am using djgpp v2 while trying to learn C.

While doing this, I needed to print out an int variable. I used
printf("%d\n", intvariable), remembering to #include <stdio.h>,
but I got the warning "Wrong format specifier...", so I looked
up the Info.

The Info-file on libc.a told me to use "%D" as format specifier
for a long int variable (since ints are equal to long ints in
djgpp).

I did so, and got the error message "Unknown format specifier...".

So, what is the _correct_ format specifier to use in printf() for a
long int, and are there more errors (_known_ errors, that is) in the
documentation ?

-- 
Email: akroev AT sn DOT no     Snailmail: N-6130 Rovde, Norway

       Be careful of your thoughts, they may become words at any moment.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019