Fortran findloc example. I have written the following subroutine called locindx.