blob: bbfe0bf5a5e0ec081f4666dc16a1e2d5e5ed87b1 [file] [log] [blame]
! Program to test the INDEX intrinsic
program test
character(len=10) a
integer w
if (index("FORTRAN", "R") .ne. 3) STOP 1
if (index("FORTRAN", "R", .TRUE.) .ne. 5) STOP 2
if (w ("FORTRAN") .ne. 3) STOP 3
end
function w(str)
character(len=7) str
integer w
w = index(str, "R")
end