1 2 3 4 5

Handling mixed character and numeric data.


Formal definition of polynomial for ease of programming.


{<sign><coeff><exponent>}*


<sign> ==> + | -


<coeff> ==> FLOAT


<exponent> ==> x | x^<degree> | []


<degree> ==> INTEGER


Use fscanf ( fid, "%lf", coeff );


Use fscanf ( fid, "%d", exponent );or fgetc( fid )


Use fgetc (fid)and ungetc (char, fid)to examine characters.


Probably best to copy input stream into an array, removing
blanks as you go, and build a pointer to the array. One can
then read from the array just like from a file.


Most sophisticated.

January 26, 1998

Page1

JH/TM

[CONVERTED BY MYRMIDON]