home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
349_01
/
sss.arc
/
EX_0301.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-09
|
746b
|
46 lines
Program EX_0301;
{Listing 4P - see documentation in TUTOR.SSS}
uses SSS;
{ For Pascal other than Turbo/Quick erase above line }
const
FREE=0;
BUSY=1;
{ For MS Pascal $include:'SSSP1.H' }
{ For MS Pascal $include:'SSSP2.H' }
function rnx(m, s: real): real;
var x : real;
begin
repeat
x := RN(m, s);
until x > 0.0;
rnx := x;
end;
procedure prime;
begin
INIQUE(0,0,1);
INISTA(1,'Busy fraction',1,0,0,0);
TALLY(1,FREE);
SETT(rnx(7, 4));
TALLY(1,BUSY);
end;
begin
prime;
repeat
if RA < 0.25 then SETT(T+ER(2,2)) else
SETT(T+TR(1,3,4));
TALLY(1,FREE);
SETT(T+rnx(7, 4));
TALLY(1,BUSY);
until T >= 120;
SUMRY('');
end.