[g77] Read statement and formatting

From: Iain Day (iain_at_day-online.org.uk.invalid)
Date: 12/24/04

  • Next message: Ken Fairfield: "Re: [g77] Read statement and formatting"
    Date: Fri, 24 Dec 2004 16:47:44 +0000
    
    

    Dear All,

    I have a Fortran 77 program which isn't behaving correctly when compiled
    with g77 (version: 3.4.2). I've tracked the problem down to the
    following read statement:

            read(file,'(q,a)',err=100,end=100)

    The problem appears to be with the format part of this statement. The
    question is, what does the '(q,a)' part mean and how do I correct the
    program? If I remove it, I get the following error message:

    sue: unformatted io not allowed
    apparent state: unit 5 (unnamed)
    lately reading sequential unformatted external IO
    Abort

    Many thanks,

    Iain


  • Next message: Ken Fairfield: "Re: [g77] Read statement and formatting"

    Relevant Pages

    • Re: Press any key to continue?
      ... find a Fortran equivalent for the following line: ... You said you are using g77, so you can mix fortran and c. ... void initscr_() ... void getch_() ...
      (comp.lang.fortran)
    • Re: Fortran Debugger help for a newbie using Windows
      ... This compiler allows me to link to the GDB ... line to fortran ), the debugger barfs. ... g77 has been off support long enough that it will take a lot of luck on recent Windows. ...
      (comp.lang.fortran)
    • Re: How to set my own program startup in f77 programs other than MAIN__
      ... I am writing simple F77 program compiler g77 on Linux. ... statement of my FORTRAN program. ... I should get the control of the program execution before first ...
      (comp.lang.fortran)
    • Re: g77 default array index starts at 0?
      ... In Fortran code there ... Now for some reason in g77 the DOUBLE array appears to want to start ... I tried with google to find some g77 compiler flag to specify the ...
      (comp.lang.fortran)
    • slow I/O with ifort compared to g77 !!!
      ... I have been comparing the performance of g77 ... I note that ifort gives generally slightly ... I wrote the following little FORTRAN code: ... CPU: 17.2200003Wall: 18. ...
      (comp.lang.fortran)