scanf() cand read what printf() produced: NaNs and Inf

N8TM@aol.com N8TM@aol.com
Mon Mar 29 19:10:00 GMT 1999


In a message dated 3/29/99 12:19:20 PM Pacific Standard Time,
jcardoso@inescn.pt writes:

> printf() generate special tokens when outputing float/doubles that are
>  not numbers (NaN) or are infinity (Inf).
>  However, scanf() can't read those tokens. Is this deliberate? Is there a
>  standard for these cases? If I contribute with a patch to correct the
>  problem will it (in principle) be accepted?

I would have put this about #4 on my list of top 3 wants for g77.  AFAIK the
standards for C and Fortran insist that the behavior of attempting to read
back such data files is undefined; I don't think even the IEEE standards
suggest a standard text form which these tokens should take.  I would find
this extension useful if it were to work between gcc and g77.


More information about the Gcc mailing list