    PROGRAM nag_rand_contin_ex07

      ! Example Program Text for nag_rand_contin
      ! NAG fl90, Release 4. NAG Copyright 2000.

      ! .. Use Statements ..
      USE nag_examples_io, ONLY : nag_std_out
      USE nag_rand_contin, ONLY : nag_rand_normal, nag_rand_seed_set, &
       nag_seed_wp => nag_seed_dp
      ! .. Implicit None Statement ..
      IMPLICIT NONE
      ! .. Intrinsic Functions ..
      INTRINSIC KIND
      ! .. Parameters ..
      INTEGER, PARAMETER :: wp = KIND(1.0D0)
      REAL (wp), PARAMETER :: a = 1.0_wp
      REAL (wp), PARAMETER :: b = 1.5_wp
      CHARACTER (*), PARAMETER :: fmt = '(/1x,a/(1X, F8.4))'
      ! .. Local Scalars ..
      INTEGER :: k
      REAL (wp) :: x
      TYPE (nag_seed_wp) :: seed
      ! .. Executable Statements ..
      WRITE (nag_std_out,*) 'Example Program Results for nag_rand_contin_ex07'

      k = 0

      CALL nag_rand_seed_set(seed,k)

      x = nag_rand_normal(seed,a=a,b=b)
      WRITE (nag_std_out,fmt) 'A scalar result using Brent''s method', x

      ! Generating  N(a,b) random variates using  Box-Muller's method

      k = 0

      CALL nag_rand_seed_set(seed,k)

      x = nag_rand_normal(seed,a=a,b=b,brent=.FALSE.)
      WRITE (nag_std_out,fmt) 'A scalar result using Box-Muller''s method', x

    END PROGRAM nag_rand_contin_ex07
