home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
i
/
interest
/
!Interest
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1993-08-27
|
5KB
|
236 lines
>!RunImage
For !Interest
26/08/93
9g$="1.05 (26 Aug 1993)":
$+" at line "+
j:b$=
b$<>""
e(b$)
$+" at line "+
&400C7,,c%
&400C8,,c%
&400C5,,c%
&400C6,,c%
17,18,19:
&400DD:
&400EF,J%:S%=@%:@%=131592:b=0:
a(e%,a%))<>0
u%=((a%-9)/2)-1:
(u%*2)+9
2:a%((a%-9)/2,0)=(
a(e%,a%))*10):
a%=12
(u%*2)+12
2:d$=
a(e%,a%):q%=
d$:a$=
q%)):
a$,1)=" ":a$=
a$-1):
a$,3):
a$,n%,1)=
a$,n%,1)
e(a$)
Ca%((a%-12)/2,1)=v%+q%:
a%=(u%*2)+12
a%((a%-12)/2,1)=365-(v%+q%)
ca%((a%-12)/2,2)=a%((a%-12)/2,1)-a%((a%-13)/2,1):
:a%(0,2)=a%(0,1)-1:
a%=33
a(e%,a%)<>0
j%=a%-2:
a%=33
a(e%,a%)):d$=
a(e%,a%+1):q%=
d$:a$=
q%)):
a$,1)=" ":a$=
a$-1):
a$,3):
a$,n%,1)=
a$,n%,1)
e(a$):s%=v%+q%:
s%<a%(0,1)
,a=c*((a%(0,0)/365000)*(a%(0,1)-s%)):b+=a
s%<a%(r%,1)-a%(r%,2)
+a=c*((a%(r%,0)/365000)*(a%(r%,2))):b+=a
s%<a%(r%,1)
s%>a%(r%,1)-a%(r%,2)
.a=c*((a%(r%,0)/365000)*(a%(r%,1)-s%)):b+=a
'"At the end of this year, you should get
";b;" in interest.":
&400EF,0:@%=S%:
m:B%=c%!24:a%=c%!4:k%=!c%:
13,398:
a%=32
a%=56
% l%=33
:l%=a%+1
f(e%,l%,
a(e%,l%)))
+ l%=32
a%=33
- l%=56
:l%=a%-1
f(e%,l%,
a(e%,l%)))
&400DC,B%
B%=13
d% 512,C% 512,K% 20,c% 512,m% 512,T% 512,L% 256,U% 512,M% 512,V% 4096,Z% 1024,J% 256,D% 256:
a%(11,2):$J%=
0):$K%="Interest":A%=
&400C0,200,&4B534154,"Interest"
_%:a%=
g(-2,0,0,68,68,12298,"!interest")
&400D9,,"<Interest$Dir>.Templates":O%=
d(T%,L%,255,"info"):o%=
d(U%,M%,255,"save"):e%=
d(V%,Z%,1023,"main"):
&400DA:$(L%+139)=g$:$M%="AccIntFile":
j:$m%="Interest":m%!12=459271:m%!16=16*11:m%!20=44:m%!24=0:
d(m%+28,0,O%,&7091031,"Info"):
d(m%+52,0,o%,&7091031,"Save"):
d(m%+76,128,-1,&7091031,"Quit"):
k:x%=!c%:y%=c%!4:`%=c%!8:k%=c%!12:a%=c%!16:
r(x%,y%,k%=-2)
g(e%)
16,64:
k%=o%
s:x%=!c%:y%=c%!4:c%!4=5:c%!8=x%-76:c%!16=x%+76:c%!12=y%-52:c%!20=y%+52:c%!24=0:c%!32=&7FFFFFFF:c%!28=0:c%!36=&7FFFFFFF:
6,161,28
,,f%:
_%>=310
&42400,197,1,"file_0e3",c%+8,c%+24
&400D0,,c%
r(aa%,P%,ba%):
ba%P%=228
&400D4,,m%,aa%-64,P%:
2:A%=
c%!16
0:A%=
#c%!20,"Run "+
h("Interest$Dir")
1282:
h(h$):
&23,h$,D%,255,0,3
,,b%:D%?b%=13:=$D%
&400D4,-1:
^-b$="":h%=c%+43:
h%?1<>0:h%+=1:b$+=
a(o%,0)
b$,".")=0
b("sav")):
b)g%=
(b$):
a(e%,a%))<>0
cUj%=(a%-9)/2:
#g%,j%:
(j%*2)+9:
a(e%,a%):
a%=33
a(e%,a%))<>0
d`j%=(a%-33)/2:
#g%,j%:
a%=33
(j%*2)+33:
a(e%,a%):
&5,"Settype "+b$+" 0E3":E%=
t:ca%=c%!40:
ca%<>227
v:b$="":h%=c%+43:
h%?1<>0:h%+=1:b$+=
e(b$):
e(b$):
b(e%,a%,""):
(b$):
#g%,j%:
(j%*2)+9:
#g%,c$:
b(e%,a%,c$):
#g%,j%:
a%=33
(j%*2)+33:
#g%,c$:
b(e%,a%,c$):
g(e%):
b(o%,0,b$):
c(i$):
&400EF,0:C%!0=255:$(C%+4)=i$:
&400DF,C%,18,K%
,da%:=da%
a(p%,a%):!d%=p%:d%!4=a%:
&400CE,,d%:=$(d%!28)
g(k%,ea%,fa%,ga%,ha%,F%,c$):d%!0=k%:d%!4=ea%:d%!8=fa%:d%!12=ga%:d%!16=ha%:d%!20=F%:$(d%+24)=c$:
&400C2,,d%
t%:=t%
v:c%!12=c%!8:c%!16=4:
&400E7,17,c%,c%!4:
g(t%):
w:!d%=t%:
&400CB,,d%:
x:N%=
d%!28=-1:
&400C5,,d%:
w:d%!0=4:d%!4=5:d%!8=11:d%!12=12:d%!16=-1:
&31,d%,d%+20:ia%=1<<(d%!20):ja%=1<<(d%!24):ka%=(d%!28+1)*ia%:la%=(d%!32+1)*ja%:
x:W%=d%!12-d%!4:H%=d%!16-d%!8:X%=(ka%-W%)/2:Y%=(la%-H%)/2:d%!4=X%:d%!8=Y%:d%!12=X%+W%:d%!16=Y%+H%:
b(p%,a%,j$):!d%=p%:d%!4=a%:
&400CE,,d%:$(d%!28)=j$:d%!8=0:d%!12=0:
&400CD,,d%:
&39,,"DragASprite_Stop"
&42401
&400D0,,0:i%=c%:
&400CF,,i%:x%=i%!0:y%=i%!4:p%=i%!12:a%=i%!16:!i%=56:i%!12=0:i%!16=1:i%!20=p%:i%!24=a%:i%!28=x%:i%!32=y%:i%!36=0:i%!40=4095:$(i%+44)=
a(o%,0)):
&400E7,17,c%,p%,a%:E%=
i(f$):
f$,".")>0:f$=
f$,".")+1):
f(p%,a%,na%):
&400D2,p%,a%,-1,-1,-1,na%:
(e$)<6
v<x%=0:
e$," ",x%)>0:x%=
e$," ",x%)+1:
(e$)-x%+1)
e(a$):
"FEB":=31
"MAR":=59
"APR":=90
"MAY":=120
"JUN":=151
"JUL":=181
"AUG":=212
"SEP":=243
"OCT":=273
"NOV":=304
"DEC":=334
d(Q%,a%,oa%,k$):
&400DB,,Q%,a%,a%+oa%,-1,k$,0:
&400C1,,Q%
t%:=t%
q:g%=
"<Interest$Dir>.Messages":G%=0:
#g%:G%+=1:
a$(G%):
#g%=0:
G%:a$(h%)=
d(w%,pa%,h%,F%,c$):w%!0=pa%:w%!4=h%:w%!8=F%:$(w%+12)=c$:
u:k%=c%!32:a%=c%!36:
b("bar"))
b("cal"))
b("mai"))
b("swi"))
b("inf"))
a(c$):qa%=
c$+1:c%!12=c%!8:c%!16=1283:$(c%+20)=c$+
0:!c%=(24+qa%)
&400E7,17,c%,c%!4:
b(c$):
20:h%=
a$(z%),":"):
a$(z%),h%-1):
l$=c$
a$(z%),
a$(z%)-h%)