Back to index

tetex-bin  3.0
fprintreal.c
Go to the documentation of this file.
00001 /* fprintreal.c: print the real number R in the Pascal format N:M on the
00002    file F.  Public domain. */
00003 
00004 #include "config.h"
00005 
00006 void
00007 fprintreal P4C(FILE*, f, double, r, int, n, int, m)
00008 {
00009   char fmt[50];  /* Surely enough, since N and M won't be more than 25
00010                     digits each!  */
00011 
00012   sprintf (fmt, "%%%d.%dlf", n, m);
00013   fprintf (f, fmt, r);
00014 }