PROGRAM x04eafe ! X04EAF Example Program Text ! Mark 23 Release. NAG Copyright 2011. ! .. 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