home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
unixtex-6.1b-src.tgz
/
tar.out
/
contrib
/
unixtex
/
web2c
/
lib
/
fprintreal.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1996-09-28
|
346 b
|
18 lines
/* fprintreal.c: print the real number R in the Pascal format N:M on the
file F. */
#include "config.h"
void
fprintreal (f, r, n, m)
FILE *f;
double r;
int n, m;
{
char fmt[50]; /* Surely enough, since N and M won't be more than 25
digits each! */
sprintf (fmt, "%%%d.%dlf", n, m);
fprintf (f, fmt, r);
}