[TRNSYS-users] Error compiling fortran using rnd and randomize and generating numbers with normal distribution

João Lopes jlopes at deea.isel.ipl.pt
Mon Jun 26 16:24:54 PDT 2006


Dear All,

 

1. Error using rnd and randomize 

I included in a fortran program the following code :

 

Randomize

factor=Int((Lim_superior-Lim_inferior+1)*rnd+Lim_inferior)

 

The compiler give me the following error:

D:\Meus_Programas\Trnsys16\MyProjects\Type281.for(184) : Error: Syntax
error, found END-OF-STATEMENT when expecting one of: ( : % . = =>

 Randomize

D:\Meus_Programas\Trnsys16\MyProjects\Type281.for(186) : Error: This name
does not have a type, and must have an explicit type.   [RND]

 factor=Int((Lim_superior-Lim_inferior+1)*rnd(0)+Lim_inferior)

 

It seems that the compiler does not recognize the functions rnd and
randomize.

 

Can you help me ?

 

2. Generating random numbers with normal distribution

I need to create a type that generate a random number between two limits
with normal distribution.

 

Does anybody can help me ?  How to do it with Compaq fortran ?

 

Thank you in advance for your support.

 

Best regards

 

J Lopes

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20060627/64c75abb/attachment-0005.htm>


More information about the TRNSYS-users mailing list