function jget(tv) include 'parameter.par' #include "precision.com" include 'common.com' c------------------------------------------------------------------------------ if(tv.le.tmn)then jget = 0 return endif if(tv.ge.tmx)then jget = n return endif do j=1,n-1 tc = temp(j) tp = temp(j+1) dp = tp-tv dc = tc-tv if(dc*dp.lt.0.0)then jget = j if(j.lt.1.or.j.gt.n-1)stop 'jget: bad j' return endif end do stop 'jget: unallowed exit' end c------------------------------------------------------------------------------