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