PROGRAM g05kefe ! G05KEF Example Program Text ! Mark 23 Release. NAG Copyright 2011. ! .. Use Statements .. USE nag_library, ONLY : a00acf, g05kbf, g05kef, nag_wp ! .. Implicit None Statement .. IMPLICIT NONE ! .. Parameters .. INTEGER, PARAMETER :: nout = 6 ! .. Local Scalars .. INTEGER :: i, ifail, igen LOGICAL :: x ! .. Local Arrays .. INTEGER :: iseed(4) ! .. Executable Statements .. WRITE (nout,*) 'G05KEF Example Program Results' WRITE (nout,*) IF (a00acf()) THEN ! Initialize the seed iseed(1) = 1762543 iseed(2) = 9324783 iseed(3) = 42344 iseed(4) = 742355 ! IGEN identifies the stream. igen = 1 CALL g05kbf(igen,iseed) ifail = 0 DO i = 1, 5 x = g05kef(0.6E0_nag_wp,igen,iseed,ifail) WRITE (nout,99999) x END DO ELSE WRITE (nout,*) ' ** No valid licence key was found' END IF 99999 FORMAT (1X,L5) END PROGRAM g05kefe