read_noadvance.f90
来自「用于进行gcc测试」· F90 代码 · 共 22 行
F90
22 行
! { dg-do run }! pr24719, non-advancing read should read more than one line! test contributed by jerry delisle <jvdelisle@gcc.gnu.org> implicit none character(1) :: chr character(20) :: correct = 'foo: bar 123abc' integer :: i open(unit = 11, status = "scratch", action="readwrite") write(11,'(a)') "foo: bar" write(11,'(a)') "123abc" rewind(11) i = 0 do i = i + 110 read(unit = 11, fmt = '(a)', advance = 'no', end = 99, eor = 11) chr if (chr.ne.correct(i:i)) call abort() cycle11 continue end do99 close(11) end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?