!   X04ABF Example Program Text
!   Mark 23 Release. NAG Copyright 2011.

    MODULE x04abfe_mod

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

!      .. Implicit None Statement ..
       IMPLICIT NONE
!      .. Parameters ..
       INTEGER, PARAMETER              :: iget = 0, iset = 1, nout = 6
    CONTAINS
!dec$ attributes offload : mic :: dummy
       SUBROUTINE dummy

!         .. Use Statements ..
          USE nag_library, ONLY : x04abf
!         .. Implicit None Statement ..
          IMPLICIT NONE
!         .. Local Scalars ..
          INTEGER                         :: nadv
!         .. Executable Statements ..
          CALL x04abf(iget,nadv)

          WRITE (nadv,*)
          WRITE (nadv,*) 'This is a dummy advisory message'

          RETURN

!dec$ attributes offload : mic :: dummy
       END SUBROUTINE dummy
    END MODULE x04abfe_mod
    PROGRAM x04abfe

!      X04ABF Example Main Program

!      .. Use Statements ..
       USE nag_library, ONLY : x04abf
       USE x04abfe_mod, ONLY : dummy, iset, nout
!      .. Implicit None Statement ..
       IMPLICIT NONE
!      .. Local Scalars ..
       INTEGER                         :: outchn
!      .. Executable Statements ..
       WRITE (nout,*) 'X04ABF Example Program Results'

       outchn = nout

       CALL x04abf(iset,outchn)

       CALL dummy

    END PROGRAM x04abfe
