home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
code_examples
/
librar
/
readfloa.c
< prev
next >
Wrap
Text File
|
1989-02-08
|
351b
|
24 lines
# include "stdio.h"
double readfloat(fd)
FILE *fd;
{
char r[30];
double atof(),ff;
int counter,d;
J00100: d=getc(fd);
if (d==13 || d==10)
goto J00100;
r[0]=d;
counter=1;
J00200: d=getc(fd);
if (d<32)
goto J00300;
r[counter++]=d;
goto J00200;
J00300: r[counter]=0;
ff=atof(r);
return(ff);
}