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_0209.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-04-17
|
779b
|
43 lines
' Program EX_0209.BAS
' Listing 3B - see documentation in TUTOR.SSS
common shared pv, pt
declare function rnx (m, s)
declare sub prime ()
rem $include: 'SSSB.H'
call prime
do
if RA < .25 then x = ER(2, 2) else x = TR(1, 3, 4)
TALLY 1, x
pt = pt + x
TALLY 2, pt - pv
pv = pt
pt = pt + rnx(7, 4)
loop while pt <= 120
title$ = " "
SUMRY sadd(title$)
title$ = "RESULTS "
SUMRY sadd(title$)
sub prime
INIQUE 0, 0, 2
title$ = "Call duration "
INISTA 1, sadd(title$), 0, 12, 2, .5
title$ = "Cycle time "
INISTA 2, sadd(title$), 0, 0, 0, 0
pv = 0!
pt = rnx(7, 4)
end sub
function rnx (m, s)
do
x = RN(m, s)
loop while x <= 0!
rnx = x
end function