flush.f
来自「一个有用的分子动力学小辅助程序」· F 代码 · 共 26 行
F
26 行
subroutine flush (un)* empties buffers for file unit 'un'.* it works only for sequential files which have a name.* this routine is AIX specific. the call should be* compatible with DECfortran's. implicit none integer un character fn*500,fo*11,bl*4,seq*3 logical ex,od,nm automatic fn,fo,bl,seq,ex,od,nm inquire(unit=un,name=fn,form=fo,blank=bl, $ exist=ex,opened=od,named=nm,sequential=seq) if ((.not.ex).or.(.not.od)) return if (nm.and.(seq.eq.'YES')) then close (unit=un) if (fo.eq.'UNFORMATTED') then open(unit=un,file=fn,form=fo,status='old') else open(unit=un,file=fn,form=fo,blank=bl,status='old') endif* under AIX file is now positioned at the end. if the* next operation is a read, however, file will be* repositioned at the beginning. endif end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?