    Program f03abfe

!     F03ABF Example Program Text

!     Mark 24 Release. NAG Copyright 2012.

!     .. Use Statements ..
      Use nag_library, Only: f03abf, nag_wp
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
      Real (Kind=nag_wp)               :: det
      Integer                          :: i, ifail, lda, n
!     .. Local Arrays ..
      Real (Kind=nag_wp), Allocatable  :: a(:,:), wkspce(:)
!     .. Executable Statements ..
      Write (nout,*) 'F03ABF Example Program Results'

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

      Read (nin,*) n
      lda = n
      Allocate (a(lda,n),wkspce(n))

      Read (nin,*)(a(i,1:n),i=1,n)

      ifail = 0
      Call f03abf(a,lda,n,det,wkspce,ifail)

      Write (nout,*)
      Write (nout,99999) 'Value of determinant = ', det

99999 Format (1X,A,F9.4)
    End Program f03abfe
