What is a good way to get file size in bytes using Fortran?

自作多情 提交于 2019-11-28 08:12:57

问题


Is there a way to get the filesize in Fortran using Intel Fortran?

I was using stat which works great in gfortran, but it is not available in ifort.


回答1:


INQUIRE(FILE=filename, SIZE=file_size)

filename is a character scalar, file_size is an integer scalar that will be defined with the size of the file in file storage units ("in bytes" on ifort), or -1 if the size cannot be determined.



来源:https://stackoverflow.com/questions/17711835/what-is-a-good-way-to-get-file-size-in-bytes-using-fortran

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!