program locatedriver implicit double precision (o-z, a-h) dimension xtab(3) ndim = 3 xtab(1) = 1. xtab(2) = 2. xtab(3) = 3. do x = 0.5,3.5,0.5 j = locate(xtab, ndim, x) write(unit=*,fmt=900) x, j end do stop c ---------------------------------------------------------- c Formats c ---------------------------------------------------------- 900 format(F5.1,I2) end