Syntax error at buffered='yes' in an open statement

I am writing a Fortran program in which one line is written like this


I have defined

character*256 filenm.

but still I am getting error

"Syntax error at or near =" in that line..


  • The problem lies in the buffered='yes', which is not standard Fortran, but some vendor extension and your compiler does not recognize it. I would just delete it and also delete the buffercount=127 (mentioned in the comment).

    Modern compilers and operating systems allow control of these things (external I/O buffering) by other means. For example, using environment variables in gfortran