ambiguous ?
Peter da Silva
peter at ficc.uu.net
Fri Oct 20 01:02:28 AEST 1989
OK, what is the order of argument evaluation in Fortran?
That is, if I do:
INTEGER FUNCTION RAND(NEWSEED)
INTEGER SEED
INTEGER NEWSEED
IF ( NEWSEED .EQ. 0 ) THEN
... code to generate new random number ...
SEED = ... whatever ...
ELSE
SEED = NEWSEED
ENDIF
RAND = SEED
END
And then:
I = RAND(very carefully designed seed)
CALL HOOPY(RAND(0), RAND(0), RAND(0))
Will this program produce the same output on different machines? Is this
guaranteed?
--
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter at ficc.uu.net, +1 713 274 5180. Fun: peter at sugar.hackercorp.com. `-_-'
"You can tell when a USENET discussion is getting old when one of the 'U`
participants drags out Hitler and the Nazis" -- Richard Sexton
More information about the Comp.lang.c
mailing list