当前位置: 动力学知识库 > 问答 > 编程问答 >

regarding locking up file access in Gfortran

问题描述:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: