    PROGRAM x04bafe

!      X04BAF Example Program Text

!      Mark 23 Release. NAG Copyright 2011.

!      .. Use Statements ..
       USE nag_library, ONLY : x04baf
!      .. Implicit None Statement ..
       IMPLICIT NONE
!      .. Parameters ..
       INTEGER, PARAMETER              :: nout = 6
!      .. Local Scalars ..
       CHARACTER (40)                  :: rec
!      .. Executable Statements ..
       WRITE (nout,*) 'X04BAF Example Program Results'

       WRITE (nout,*)
       WRITE (rec,99999) 'This record was output by X04BAF'
       FLUSH (nout)

       CALL x04baf(nout,rec)

99999  FORMAT (1X,A)
    END PROGRAM x04bafe
