    PROGRAM x03abfe

!      X03ABF Example Program Text

!      Mark 23 Release. NAG Copyright 2011.

!      .. Use Statements ..
       USE nag_library, ONLY : nag_wp, x03abf
!      .. Implicit None Statement ..
       IMPLICIT NONE
!      .. Parameters ..
       INTEGER, PARAMETER              :: n = 3, nin = 5, nout = 6
!      .. Local Scalars ..
       COMPLEX (KIND=nag_wp)           :: cx, dx
       INTEGER                         :: i, ifail, isizea, isizeb, istepa,    &
                                          istepb, j
       LOGICAL                         :: sw
!      .. Local Arrays ..
       COMPLEX (KIND=nag_wp)           :: a(n,n), b(n)
!      .. Executable Statements ..
       WRITE (nout,*) 'X03ABF Example Program Results'

!      Skip heading in data file
       READ (nin,*)

       READ (nin,*) ((a(i,j),j=1,n),i=1,n), (b(i),i=1,n)
       cx = (1.0E0_nag_wp,1.0E0_nag_wp)
       isizea = n
       isizeb = n
       istepa = 1
       istepb = 1
       sw = .TRUE.

       ifail = 0
       CALL x03abf(a(1,2),isizea,b,isizeb,n,istepa,istepb,cx,dx,sw,ifail)

       WRITE (nout,*)
       WRITE (nout,99999) 'Result = ', dx

99999  FORMAT (1X,A,'(',F3.0,',',F3.0,')')
    END PROGRAM x03abfe
