home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / i / interest / !Interest / !RunImage (.txt) < prev    next >
RISC OS BBC BASIC V Source  |  1993-08-27  |  5KB  |  236 lines

  1.  >!RunImage
  2.  For !Interest
  3.  26/08/93
  4. 9g$="1.05 (26 Aug 1993)":
  5. $+" at line "+
  6. j:b$=
  7. b$<>""
  8. e(b$)
  9. $+" at line "+
  10. &400C7,,c%
  11. &400C8,,c%
  12. &400C5,,c%
  13. &400C6,,c%
  14. 17,18,19:
  15. &400DD:
  16. &400EF,J%:S%=@%:@%=131592:b=0:
  17. a(e%,a%))<>0
  18. u%=((a%-9)/2)-1:
  19. (u%*2)+9
  20. 2:a%((a%-9)/2,0)=(
  21. a(e%,a%))*10):
  22. a%=12
  23. (u%*2)+12
  24. 2:d$=
  25. a(e%,a%):q%=
  26. d$:a$=
  27. q%)):
  28. a$,1)=" ":a$=
  29. a$-1):
  30. a$,3):
  31. a$,n%,1)=
  32. a$,n%,1)
  33. e(a$)
  34. Ca%((a%-12)/2,1)=v%+q%:
  35. a%=(u%*2)+12
  36. a%((a%-12)/2,1)=365-(v%+q%)
  37. ca%((a%-12)/2,2)=a%((a%-12)/2,1)-a%((a%-13)/2,1):
  38. :a%(0,2)=a%(0,1)-1:
  39. a%=33
  40. a(e%,a%)<>0
  41. j%=a%-2:
  42. a%=33
  43. a(e%,a%)):d$=
  44. a(e%,a%+1):q%=
  45. d$:a$=
  46. q%)):
  47. a$,1)=" ":a$=
  48. a$-1):
  49. a$,3):
  50. a$,n%,1)=
  51. a$,n%,1)
  52. e(a$):s%=v%+q%:
  53. s%<a%(0,1)
  54. ,a=c*((a%(0,0)/365000)*(a%(0,1)-s%)):b+=a
  55. s%<a%(r%,1)-a%(r%,2)
  56. +a=c*((a%(r%,0)/365000)*(a%(r%,2))):b+=a
  57. s%<a%(r%,1)
  58. s%>a%(r%,1)-a%(r%,2)
  59. .a=c*((a%(r%,0)/365000)*(a%(r%,1)-s%)):b+=a
  60. '"At the end of this year, you should get 
  61. ";b;" in interest.":
  62. &400EF,0:@%=S%:
  63. m:B%=c%!24:a%=c%!4:k%=!c%:
  64. 13,398:
  65. a%=32
  66. a%=56
  67. %    l%=33
  68. :l%=a%+1
  69. f(e%,l%,
  70. a(e%,l%)))
  71. +    l%=32
  72. a%=33
  73. -    l%=56
  74. :l%=a%-1
  75. f(e%,l%,
  76. a(e%,l%)))
  77. &400DC,B%
  78. B%=13
  79. 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:
  80. a%(11,2):$J%=
  81. 0):$K%="Interest":A%=
  82. &400C0,200,&4B534154,"Interest"
  83. _%:a%=
  84. g(-2,0,0,68,68,12298,"!interest")
  85. &400D9,,"<Interest$Dir>.Templates":O%=
  86. d(T%,L%,255,"info"):o%=
  87. d(U%,M%,255,"save"):e%=
  88. d(V%,Z%,1023,"main"):
  89. &400DA:$(L%+139)=g$:$M%="AccIntFile":
  90. j:$m%="Interest":m%!12=459271:m%!16=16*11:m%!20=44:m%!24=0:
  91. d(m%+28,0,O%,&7091031,"Info"):
  92. d(m%+52,0,o%,&7091031,"Save"):
  93. d(m%+76,128,-1,&7091031,"Quit"):
  94. k:x%=!c%:y%=c%!4:`%=c%!8:k%=c%!12:a%=c%!16:
  95. r(x%,y%,k%=-2)
  96. g(e%)
  97. 16,64:
  98. k%=o%
  99. 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:
  100. 6,161,28
  101. ,,f%:
  102. _%>=310
  103. &42400,197,1,"file_0e3",c%+8,c%+24
  104. &400D0,,c%
  105. r(aa%,P%,ba%):
  106. ba%P%=228
  107. &400D4,,m%,aa%-64,P%:
  108. 2:A%=
  109. c%!16
  110. 0:A%=
  111. #c%!20,"Run "+
  112. h("Interest$Dir")
  113. 1282:
  114. h(h$):
  115. &23,h$,D%,255,0,3
  116. ,,b%:D%?b%=13:=$D%
  117. &400D4,-1:
  118. ^-b$="":h%=c%+43:
  119. h%?1<>0:h%+=1:b$+=
  120. a(o%,0)
  121. b$,".")=0
  122. b("sav")):
  123. b)g%=
  124. (b$):
  125. a(e%,a%))<>0
  126. cUj%=(a%-9)/2:
  127. #g%,j%:
  128. (j%*2)+9:
  129. a(e%,a%):
  130. a%=33
  131. a(e%,a%))<>0
  132. d`j%=(a%-33)/2:
  133. #g%,j%:
  134. a%=33
  135. (j%*2)+33:
  136. a(e%,a%):
  137. &5,"Settype "+b$+" 0E3":E%=
  138. t:ca%=c%!40:
  139. ca%<>227
  140. v:b$="":h%=c%+43:
  141. h%?1<>0:h%+=1:b$+=
  142. e(b$):
  143. e(b$):
  144. b(e%,a%,""):
  145. (b$):
  146. #g%,j%:
  147. (j%*2)+9:
  148. #g%,c$:
  149. b(e%,a%,c$):
  150. #g%,j%:
  151. a%=33
  152. (j%*2)+33:
  153. #g%,c$:
  154. b(e%,a%,c$):
  155. g(e%):
  156. b(o%,0,b$):
  157. c(i$):
  158. &400EF,0:C%!0=255:$(C%+4)=i$:
  159. &400DF,C%,18,K%
  160. ,da%:=da%
  161. a(p%,a%):!d%=p%:d%!4=a%:
  162. &400CE,,d%:=$(d%!28)
  163. 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$:
  164. &400C2,,d%
  165. t%:=t%
  166. v:c%!12=c%!8:c%!16=4:
  167. &400E7,17,c%,c%!4:
  168. g(t%):
  169. w:!d%=t%:
  170. &400CB,,d%:
  171. x:N%=
  172. d%!28=-1:
  173. &400C5,,d%:
  174. w:d%!0=4:d%!4=5:d%!8=11:d%!12=12:d%!16=-1:
  175. &31,d%,d%+20:ia%=1<<(d%!20):ja%=1<<(d%!24):ka%=(d%!28+1)*ia%:la%=(d%!32+1)*ja%:
  176. 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%:
  177. b(p%,a%,j$):!d%=p%:d%!4=a%:
  178. &400CE,,d%:$(d%!28)=j$:d%!8=0:d%!12=0:
  179. &400CD,,d%:
  180. &39,,"DragASprite_Stop"
  181. &42401
  182. &400D0,,0:i%=c%:
  183. &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)=
  184. a(o%,0)):
  185. &400E7,17,c%,p%,a%:E%=
  186. i(f$):
  187. f$,".")>0:f$=
  188. f$,".")+1):
  189. f(p%,a%,na%):
  190. &400D2,p%,a%,-1,-1,-1,na%:
  191. (e$)<6
  192. v<x%=0:
  193. e$," ",x%)>0:x%=
  194. e$," ",x%)+1:
  195. (e$)-x%+1)
  196. e(a$):
  197. "FEB":=31
  198. "MAR":=59
  199. "APR":=90
  200. "MAY":=120
  201. "JUN":=151
  202. "JUL":=181
  203. "AUG":=212
  204. "SEP":=243
  205. "OCT":=273
  206. "NOV":=304
  207. "DEC":=334
  208. d(Q%,a%,oa%,k$):
  209. &400DB,,Q%,a%,a%+oa%,-1,k$,0:
  210. &400C1,,Q%
  211. t%:=t%
  212. q:g%=
  213. "<Interest$Dir>.Messages":G%=0:
  214. #g%:G%+=1:
  215. a$(G%):
  216. #g%=0:
  217. G%:a$(h%)=
  218. d(w%,pa%,h%,F%,c$):w%!0=pa%:w%!4=h%:w%!8=F%:$(w%+12)=c$:
  219. u:k%=c%!32:a%=c%!36:
  220. b("bar"))
  221. b("cal"))
  222. b("mai"))
  223. b("swi"))
  224. b("inf"))
  225. a(c$):qa%=
  226. c$+1:c%!12=c%!8:c%!16=1283:$(c%+20)=c$+
  227. 0:!c%=(24+qa%)
  228. &400E7,17,c%,c%!4:
  229. b(c$):
  230. 20:h%=
  231. a$(z%),":"):
  232. a$(z%),h%-1):
  233. l$=c$
  234. a$(z%),
  235. a$(z%)-h%)
  236.