------- Comment #2 from Catherine dot M dot Moroney at jpl dot nasa dot gov  
2007-04-18 18:16 -------
Subject: Re:  Inability to read ascii text with generic 'f' format

read(10,*) doesn't work.  I have access to two other compilers
(SGI and Portland Group) and both of them accepted the
read(10,(10x,f,f)') syntax and worked properly.

read(10,'(a,f,f)') also doesn't work with gfortran, though
it does with both of the other compilers.  gfortran
refuses to compile a formatting string with just an 'f',
complaining that the format string doesn't have a non-
negative width.

Catherine

On Apr 17, 2007, at 7:45 PM, jvdelisle at gcc dot gnu dot org wrote:

>
>
> ------- Comment #1 from jvdelisle at gcc dot gnu dot org  2007-04-18  
> 03:44 -------
> I think you should just use read(10,*) or better yet, read the whole  
> line into
> a single string and search for the "=" in the string, noting  
> the_position, then
> use read(stringname(the_position:),*) input list
>
> In other words you can specify a string section in the read to exclude  
> all the
> junk in the front part.
>
> Others chime in. :)  We can not change the behavior of fortran, but we  
> can use
> it.
>
>
> --  
>
> jvdelisle at gcc dot gnu dot org changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------- 
> -----
>              Status|UNCONFIRMED                 |RESOLVED
>          Resolution|                            |INVALID
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31614
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31614

  • [Bug fortran/31614] In... Catherine dot M dot Moroney at jpl dot nasa dot gov

Reply via email to