问题描述:

In Intel FORTRAN I could simply write share ='denyrw' in the open statement to prevent a file from multiaccess. However in GNU FORTRAN the statement seemed not working.

What is the correct syntax to deny reading/writing of a file in FORTRAN?

网友答案:

share is a ifort specific specifier and is not standard. If you use this, don't expect it to be honoured by other compilers. action may be one option, but its global for the file system. I don't think there is any specifier as such in fortran standard.

You will find the fortran standards here

So moral of the story is: either stick to standard or stick to your compiler

相关阅读:
Top