NAG Library Manual, Mark 27.3
Interfaces:  FL   CL   CPP   AD 

NAG FL Interface Introduction
Example description
    Program x04eafe

!     X04EAF Example Program Text

!     Mark 27.3 Release. NAG Copyright 2021.

!     .. Use Statements ..
      Use nag_library, Only: x04eaf
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: nmax = 5, nout = 6
      Integer, Parameter               :: lda = nmax
!     .. Local Scalars ..
      Integer                          :: i, ifail, j
!     .. Local Arrays ..
      Integer                          :: a(lda,nmax)
!     .. Executable Statements ..
      Write (nout,*) 'X04EAF Example Program Results'

      Write (nout,*)
      Flush (nout)

!     Generate an array of data

      Do j = 1, nmax

        Do i = 1, lda
          a(i,j) = 10*i + j
        End Do

      End Do

!     Print 3 by nmax rectangular matrix

      ifail = 0
      Call x04eaf('General',' ',3,nmax,a,lda,'Example 1:',ifail)

      Write (nout,*)
      Flush (nout)

!     Print nmax by nmax lower triangular matrix

      ifail = 0
      Call x04eaf('Lower','Non-unit',nmax,nmax,a,lda,'Example 2:',ifail)

    End Program x04eafe