! Program to test the INDEX intrinsicprogram testcharacter(len=10)ainteger wif(index("FORTRAN","R").ne.3)call abortif(index("FORTRAN","R",.TRUE.).ne.5)call abortif(w("FORTRAN").ne.3)call abortendfunction w(str)character(len=7)strinteger ww=index(str,"R")end