1! Program to test the INDEX intrinsic 2program test 3 character(len=10) a 4 integer w 5 if (index("FORTRAN", "R") .ne. 3) STOP 1 6 if (index("FORTRAN", "R", .TRUE.) .ne. 5) STOP 2 7 if (w ("FORTRAN") .ne. 3) STOP 3 8end 9 10function w(str) 11 character(len=7) str 12 integer w 13 w = index(str, "R") 14end 15 16