*     S21DAF Example Program Text
*     Mark 20 Release. NAG Copyright 2001.
*     .. Parameters ..
      INTEGER          NIN, NOUT
      PARAMETER        (NIN=5,NOUT=6)
*     .. Local Scalars ..
      COMPLEX *16      Y, Z
      DOUBLE PRECISION A, AKP, B
      INTEGER          IFAIL
*     .. External Functions ..
      COMPLEX *16      S21DAF
      EXTERNAL         S21DAF
*     .. Executable Statements ..
      WRITE (NOUT,*) 'S21DAF Example Program Results'
*     Skip heading in data file
      READ (NIN,*)
      WRITE (NOUT,*)
      WRITE (NOUT,*) '     Z          AKP     A',
     +  '      B                 Y                 IFAIL'
      WRITE (NOUT,*)
   20 READ (NIN,*,END=40) Z, AKP, A, B
      IFAIL = 0
*
      Y = S21DAF(Z,AKP,A,B,IFAIL)
*
      WRITE (NOUT,99999) Z, AKP, A, B, Y, IFAIL
      GO TO 20
   40 STOP
*
99999 FORMAT (1X,'(',F4.1,',',F4.1,' )',3F7.1,3X,'(',1P,E12.4,',',E12.4,
     +       ' )',I6)
      END
