PROGRAM g05kbfe ! G05KBF Example Program Text ! Mark 23 Release. NAG Copyright 2011. ! .. Use Statements .. USE nag_library, ONLY : a00acf, g05kaf, g05kbf, nag_wp ! .. Implicit None Statement .. IMPLICIT NONE ! .. Parameters .. INTEGER, PARAMETER :: nout = 6 ! .. Local Scalars .. REAL (KIND=nag_wp) :: x INTEGER :: i, igen ! .. Local Arrays .. INTEGER :: iseed(4) ! .. Executable Statements .. WRITE (nout,*) 'G05KBF 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) DO i = 1, 5 x = g05kaf(igen,iseed) WRITE (nout,99999) x END DO ELSE WRITE (nout,*) ' ** No valid licence key was found' END IF 99999 FORMAT (1X,F10.4) END PROGRAM g05kbfe