*     S14AEF Example Program Text
*     Mark 20 Release. NAG Copyright 2001.
*     .. Parameters ..
      INTEGER          NIN, NOUT
      PARAMETER        (NIN=5,NOUT=6)
*     .. Local Scalars ..
      DOUBLE PRECISION X, Y
      INTEGER          IFAIL, K
*     .. External Functions ..
      DOUBLE PRECISION S14AEF
      EXTERNAL         S14AEF
*     .. Executable Statements ..
      WRITE (NOUT,*) 'S14AEF Example Program Results'
*     Skip heading in data file
      READ (NIN,*)
      WRITE (NOUT,*)
      WRITE (NOUT,*) '   X     K    (D^K/DX^K)psi(X)    IFAIL'
      WRITE (NOUT,*)
   20 READ (NIN,*,END=40) X, K
      IFAIL = 0
*
      Y = S14AEF(X,K,IFAIL)
*
      WRITE (NOUT,99999) X, K, Y, IFAIL
      GO TO 20
   40 STOP
*
99999 FORMAT (1X,F5.1,I5,5X,1P,E12.4,3X,I7)
      END
