[fortran, doc] Improve random_seed example
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon May 20 23:50:00 GMT 2013
On Fri, May 17, 2013 at 03:18:01PM +0300, Janne Blomqvist wrote:
> Hi,
>
> the example we provide for the usage of the random_seed intrinsic
> could be better. At least one user has already been tripped over by
> the fact that on some targets the first call to system_clock returns
> 0, resulting in a poor seed. Below is an improved(?!) example program.
>
> Ok for trunk/4.8/4.7? (Changelog + patch is of course trivial once
> there is agreement on the code itself)
>
Looks OK to me.
It should probably also be noted in the manual that one can get
real poor results if one does not set all seed values.
--
Steve
More information about the Fortran
mailing list