%N evalpoly %F $MIR/src/subs/calpoly.for
%D Evaluate a polynomial
%: calibration, polynomials
%P pjt
%B
        REAL FUNCTION evalpoly( t, code, bl, valid)
        IMPLICIT NONE

        INTEGER   bl, valid
        CHARACTER code*(*)
        REAL      t

   Evaluate a polynomial (assumed to have been read in using
   getpoly):

   Input:
       t         ordinate (time, freq)
       code      phase/amp code ('ALW?' etc.)
       bl        baseline [b=findbase(bl,base,nbl); b=1..nbl]
   Output:
       valid     validity; (0=ok  1=extrp. 2=extrp. across break)
                            -1 no pol present (P,A=1,0 returned)
       evalpoly  value of polynomial
