This is the mail archive of the
mailing list for the GCC project.
Re: GNU Fortran inquiry
- From: "Tim Prince" <tprince at computer dot org>
- To: "Isabelle Descamps" <descamps at ensm-douai dot fr>,<gcc at gcc dot gnu dot org>
- Date: Tue, 27 Nov 2001 14:42:09 -0800
- Subject: Re: GNU Fortran inquiry
- References: <email@example.com>
You are more likely to receive replies on the gcc-help list or
comp.lang.fortran, if you wish more detailed suggestions. Yes, a given seed
should reproduce the same pseudo-random sequence. As you suggest, a typical
strategy for varying the seed is to calculate it from the time of day. For
example, on most g77 and other Fortran implementations, the time in
milliseconds since midnight may be obtained from the hour, minute, second,
and millisecond fields returned by 'call get_time_of_day()'. g77's subset
of the standard get_time_of_day is documented in 'info g77.'
----- Original Message -----
From: "Isabelle Descamps" <firstname.lastname@example.org>
Sent: Tuesday, November 27, 2001 9:00 AM
Subject: GNU Fortran inquiry
> Dear Sir,
> I send you this mail because I would like to get help with GNU Fortran,
> particularly with intrinsic functions and subroutines.
> In fact, I 'm doing a model in fortran langage.
> I must use a random generator.
> So, I use the following intrinsic function : rand(seed).
> Netherveless, a given seed always produces the same sequence of values
> I would like to know if it is possible to use a constant to seed with the
> current time.
> I'll thank you
> Isabelle Descamps
> École des Mines de Douai
> Département Énergétique industrielle
> 941, rue Charles Bourseul
> BP 838
> 59508 DOUAI Cedex
> tél. : 03 27 71 23 86
> Mail : email@example.com
> Visitez notre site : http://www.ensm-douai.fr/