fgetc_3.f90

来自「用于进行gcc测试」· F90 代码 · 共 35 行

F90
35
字号
! Testcase for the FGETC and FPUTC intrinsics! { dg-do compile }  character(len=5) s  integer st  s = "12345"  open(status="scratch")  write(*,"(A)") "abcde"  rewind(10)  st = fget(s)  if ((st /= 0) .or. (s /= "a    ")) call abort  st = fget(s)  close(10)  open(status="scratch")  s = "12345"  st = fput(s)  if (st /= 0) call abort  st = fput("2")  if (st /= 0) call abort  st = fput("3 ")  if (st /= 0) call abort  rewind(10)  st = fget(s)  if (s(1:1) /= "1") call abort  st = fget(s)  if (s(1:1) /= "2") call abort  st = fget(s)  if ((s(1:1) /= "3") .or. (st /= 0)) call abort  st = fget(s)  if (st /= -1) call abort  close (10)  end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?