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

NAG FL Interface Introduction
Example description
!   X04AAF Example Program Text
!   Mark 27.2 Release. NAG Copyright 2021.

    Module x04aafe_mod

!     X04AAF Example Program Module:
!            Parameters and User-defined Routines

!     .. Implicit None Statement ..
      Implicit None
!     .. Accessibility Statements ..
      Private
      Public                           :: dummy
!     .. Parameters ..
      Integer, Parameter, Public       :: nout = 6
    Contains
      Subroutine dummy

!       .. Use Statements ..
        Use nag_library, Only: x04aaf
!       .. Local Scalars ..
        Integer                        :: nerr
!       .. Executable Statements ..
        Call x04aaf(0,nerr)

        Write (nerr,*)
        Write (nerr,*) 'This is a dummy error message'

        Return

      End Subroutine dummy
    End Module x04aafe_mod
    Program x04aafe

!     X04AAF Example Main Program

!     .. Use Statements ..
      Use nag_library, Only: x04aaf
      Use x04aafe_mod, Only: dummy, nout
!     .. Implicit None Statement ..
      Implicit None
!     .. Local Scalars ..
      Integer                          :: outchn
!     .. Executable Statements ..
      Write (nout,*) 'X04AAF Example Program Results'

      outchn = nout

      Call x04aaf(1,outchn)

      Call dummy

    End Program x04aafe