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.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-04-09
|
689b
|
43 lines
' Program EX_0301.BAS
' Listing 4B - see documentation in TUTOR.SSS
const free = 0, busy = 1
declare function rnx (m, s)
declare sub prime ()
rem $include: 'SSSB.H'
call prime
do
if RA < .25 then
SETT T + ER(2, 2)
else
SETT T + TR(1, 3, 4)
end if
TALLY 1, free
SETT T + rnx(7, 4)
TALLY 1, busy
loop while T <= 120
title$ = " "
SUMRY sadd(title$)
sub prime
INIQUE 0, 0, 1
title$ = "Busy fraction "
INISTA 1, sadd(title$), 1, 0, 0, 0
TALLY 1, free
SETT rnx(7, 4)
TALLY 1, busy
end sub
function rnx (m, s)
do
x = RN(m, s)
loop while x <= 0!
rnx = x
end function