{$F-,R-,S-} function random( var seed: real ): real; { RETURNS RANDOM NUMBERS IN RANGE 0.0 - 1.0 } { GLOBAL: SEED: REAL; } CONST PI = 3.14159; VAR X: REAL; I: INTEGER; begin x := seed + PI; x := exp(5.0 * ln(x)); seed := x - trunc(x); random := seed; end{ of random }; {$F+,R+,S+}