home *** CD-ROM | disk | FTP | other *** search
- 100 rem silent partner
- 110 rem wayne arnett
- 120 rem
- 130 print chr$(142),chr$(147)
- 140 print tab(11)"silent partner"
- 150 print tab(11)"--------------"
- 160 dim p(13),bb(12),sd(12)
- 170 dim m$(12),t$(19),d(19),u(19)
- 180 for i=1to12:read m$(i):next
- 190 for i=1to19:read t$(i):next
- 200 li$=" **************************************":rem space + 38 *
- 210 ul$="[163][163][163][163][163][163][163][163]":rem 8 comm. t's
- 220 f1$=chr$(133):f7$=chr$(136)
- 230 def fna(x)=int((x+.005)*100)/100
- 240 def fnb(x)=int((x+.0005)*1000)/10
- 250 h1$="summary statement: "
- 260 data january,february,march,april,may,june
- 265 :
- 270 data july,august,september,october,november,december
- 275 :
- 280 data beginning balance,owner deposit(s),rental income,other income
- 285 :
- 290 data total rent & other,loan pmt (piti),other loan pmts,utilities & water
- 295 :
- 300 data landscape,condo fee,repair & maint,advertising,misc expense
- 305 :
- 310 data total expense,owner withdrawal(s),ending balance,sec dep liability
- 315 :
- 320 data operating cash,cash flow this period
- 330 for i=1to19
- 340 for j=1 to 22-len(t$(i))
- 350 t$(i)=t$(i)+" ":rem 1 space
- 360 next j,i:goto390
- 365 :
- 370 rem *** menu
- 375 :
- 380 print"[147]"
- 390 print:print
- 400 print tab(8)"1 - ";tab(13)"enter data":print
- 410 print tab(8)"2 - ";tab(13)"read from files":print
- 420 print tab(8)"3 - ";tab(13)"exit program":print
- 430 printli$:print
- 440 print tab(7)"enter your choice - ";
- 450 input r:on r goto470,1990,2620
- 455 :
- 460 rem *** preliminary information
- 465 :
- 470 print"[147]":if key=0 then510
- 480 print"there's already data in memory. new"
- 490 print"entries will over-write old data. "
- 500 print:rt=1:goto2470
- 510 gosub2390
- 520 if ad$<>""then560
- 530 print"enter property address - max one line:"
- 540 print ">";:input ad$
- 550 if len(ad$)<2 then print"must have an address":goto540
- 560 ad$=left$(ad$,40):lf$=left$(ad$,2)
- 570 print:printli$
- 580 print"enter any comments or notes you want to"
- 590 print"appear on the printout - max 2 lines."
- 600 print ">";:input cm$
- 610 cm$=left$(cm$,80)
- 620 print:printli$:if gs then return
- 630 print"enter number of month of this summary."
- 640 print">";:input m:if m<1 or m>12 then640
- 645 :
- 650 rem *** collect and process data
- 655 :
- 660 print"[147]enter amounts for ";m$(m):print
- 670 for i=1to17
- 680 if i=5 or i=14 or i=16 then i=i+1
- 690 printi;tab(4)t$(i);
- 700 print "--- ";:input d(i)
- 710 if i=2 or i=4 then printli$
- 720 next:printli$:nd=1
- 730 print"check your entries - are there any"
- 740 print"mistakes? (y/n)";
- 750 input r$:if left$(r$,1)="y" then770
- 760 goto830
- 770 input"enter line no. that has an error";r
- 780 if r<1 or r>17then770
- 790 if r=5 or r=14 or r=16 then770
- 800 print"enter correction for line";r;
- 810 input ec:d(r)=ec
- 820 print"any other mistakes? (y/n)";:goto750
- 830 print"[147]":if pr>1000 then860
- 840 input"purchase price";pr
- 850 print:input"down payment";dp
- 855 :
- 860 print:printtab(11)"processing data"
- 870 key=1:d(5)=d(3)+d(4)
- 880 for i=6to13:d(14)=d(14)+d(i):next
- 890 d(16)=d(1)+d(2)+d(5)-d(14)-d(15)
- 900 d(18)=d(16)-d(17)
- 910 d(19)=d(5)-d(14)
- 920 for i=1to19:d(i)=fna(d(i)):next
- 930 if lm>fm then950
- 940 h2$=h1$+m$(m):goto960
- 950 h2$=h1$+m$(fm)+" to "+m$(lm)
- 960 if file=1 then1220
- 970 print"[147]do you want to record a file with"
- 980 print m$(m);"'s data? (y/n)";
- 990 input r$:if left$(r$,1)<>"y"then1220
- 995 :
- 1000 rem *** write to file
- 1005 :
- 1010 if lm>fm then1040
- 1020 if file=1 then1070
- 1030 goto1090
- 1040 print:print"more than one month's data is in"
- 1050 print"memory. saving this will cause file"
- 1060 print"error!":print:goto2430
- 1070 print:print"don't try to resave same data"
- 1080 print:goto2430
- 1090 printli$:print"be sure disk drive is ready to record."
- 1100 print:rt=2:goto2470
- 1110 close1
- 1120 na$="0:"+lf$+m$(m)+",s,w"
- 1130 print na$:open1,8,9,na$
- 1140 print#1,m
- 1150 for j=1to13:if j=5 then j=6
- 1160 print#1,d(j):next
- 1170 print#1,d(15):print#1,d(17)
- 1180 print#1,pr:print#1,dp
- 1190 print#1,ad$
- 1200 close1:file=1
- 1205 :
- 1210 rem *** printout
- 1215 :
- 1220 print"[147]be sure printer is on, and the paper"
- 1230 print:print"positioned for an 11 inch run."
- 1240 print:printli$
- 1250 if lm>fm then gs=1:gosub580:gs=0
- 1260 print:rt=3:goto2470
- 1270 close3:open3,4
- 1280 print#3,chr$(14)h2$
- 1290 print#3:print#3,ad$;chr$(15)
- 1300 print#3:print#3,"notes:"
- 1310 print#3,cm$:cm$=""
- 1320 for i=1to39:print#3,"- ";:next
- 1330 print#3:print#3,chr$(14)
- 1340 print#3,chr$(16)"20income and expense"
- 1350 print#3,chr$(15):print#3
- 1360 m=0:t1=10:t2=5:t3=20
- 1370 for i=1to5:if i=3 then print#3
- 1380 gosub1450:next
- 1390 t1=15:t2=0:t3=13
- 1400 for i=6to14:gosub1450:next
- 1410 t1=10:t2=5:t3=20
- 1420 for i=15to19:gosub1440:next
- 1430 goto1570
- 1440 if i=15 or i=17 or d(i)<0 then m=1
- 1450 u(i)=abs(d(i)):gs=1
- 1460 v=u(i):gosub2550:r$=v$
- 1470 l=len(r$):r$=right$(r$,l-1)
- 1480 print#3,tab(t1)t$(i);
- 1490 print#3,tab(t2)"------";
- 1500 if m then1520
- 1510 print#3,tab(t3-l)r$:goto1530
- 1520 print#3,tab(t3-(l+1));"(";r$;")"
- 1530 if i=5 or i=14 or i=16 then1550
- 1540 goto1560
- 1550 print#3,tab(t3+43-l);right$(ul$,l-1)
- 1560 m=0:return
- 1570 print#3:print#3:print#3,chr$(14)
- 1580 print#3,chr$(16)"22expense analysis"
- 1590 print#3,chr$(15)
- 1600 print#3:print#3,tab(3)"expenses:";
- 1610 print#3,tab(13)"dollar amount";
- 1620 print#3,tab(5)"% total exp.";
- 1630 print#3,tab(5)"% rental income"
- 1640 print#3
- 1650 for i=6to14
- 1660 v=d(i):gosub2550:r1$=v$
- 1670 p1=d(i)/d(14):p1=fnb(p1)
- 1680 v=p1:gosub2610:r2$=v$
- 1690 if d(3)=0 then r3$="n/a":goto1720
- 1700 p2=d(i)/d(3):p2=fnb(p2)
- 1710 v=p2:gosub2610:r3$=v$
- 1720 print#3,tab(3)t$(i);
- 1730 print#3,tab(9-len(r1$))r1$;
- 1740 print#3,tab(17-len(r2$))r2$;
- 1750 print#3,tab(19-len(r3$))r3$:next
- 1760 if pr<1000 or d(3)=0 then 1970
- 1770 print#3:print#3:print#3,chr$(14)
- 1780 print#3,chr$(16)"19investment analysis"
- 1790 print#3,chr$(15):print#3
- 1800 grm=pr/((d(3)/nd)*12):grm=fna(grm)
- 1810 cf=(d(19)/nd):cf=fna(cf)
- 1820 rn=(cf*12)/dp:rn=fnb(rn)
- 1830 be=(d(14)/nd):be=fna(be)
- 1840 gs=0:v=pr:gosub2550:pr$=v$
- 1850 print#3,"purchase price: ";pr$;
- 1860 v=dp:gosub2550:dp$=v$
- 1870 print#3,tab(20)"down payment: ";dp$
- 1880 print#3,"gross rent multiplier =";grm;
- 1890 if cf<0 thencf$=str$(cf):goto1910
- 1900 v=cf:gosub2550:cf$=v$
- 1910 print#3,tab(4)"average or present cash flow: ";cf$
- 1920 print#3,"return as an (annualized) percentage of down payment: ";
- 1930 print#3,rn;"%"
- 1940 v=be:gosub2550:be$=v$
- 1950 print#3,"monthly rent needed to break even based ";
- 1960 print#3,"on current/ave expenses: ";be$
- 1970 close3:goto380
- 1975 :
- 1980 rem *** readfrom file
- 1985 :
- 1990 if key=0 and file=0 then2030
- 2000 print"[147]there is data in memory which will be"
- 2010 print"lost while reading from files.":print
- 2020 print:rt=4:goto2470
- 2030 gosub2390
- 2040 print:print"[147]be sure disk drive is ready with the"
- 2050 print"correct file disk inserted."
- 2060 printli$
- 2070 print"enter number of first month to be read"
- 2080 print"from files into memory."
- 2090 print:input"first month";fm
- 2100 if fm<1 or fm>12 then2090
- 2110 print:print"to read more than one file (for a"
- 2120 print"summary) enter number of last month."
- 2130 print"otherwise, hit return without a number."
- 2140 print:input"last month";lm
- 2150 if lm<2 then lm=fm:nd=1:goto2180
- 2160 if lm>12 or lm<fm then print"invalid":lm=0:goto2140
- 2170 nd=(lm-fm)+1
- 2180 if lf$<>""then2220
- 2190 print:print"enter first 2 characters of the"
- 2200 input"property's address";lf$
- 2210 lf$=left$(lf$,2)
- 2220 print:close1
- 2230 for i=fm to lm
- 2240 na$=lf$+m$(i)
- 2250 print na$:open1,8,9,na$
- 2260 input#1,m:input#1,bb(i)
- 2270 for j=2to13:if j=5 then j=6
- 2280 input#1,p(j):d(j)=d(j)+p(j):nextj
- 2290 input#1,ow:d(15)=d(15)+ow
- 2300 input#1,sd(i)
- 2310 input#1,aa:if aa>1000 then pr=aa
- 2320 input#1,bb:if bb>100 then dp=bb
- 2330 input#1,ad$
- 2340 close1:nexti
- 2350 file=1:d(1)=bb(fm):d(17)=sd(lm)
- 2360 goto860
- 2365 :
- 2370 rem *** subroutines
- 2375 :
- 2380 rem set variables to zero
- 2390 for i=1to19:d(i)=0:next
- 2400 file=0:key=0:fm=0:lm=0
- 2410 return
- 2420 rem function keys
- 2430 print tab(6)"<<< press 'f1' for menu >>>":printli$
- 2440 get r$:if r$=""then2440
- 2450 if r$=f1$ then380
- 2460 goto2440
- 2470 print tab(6)"<<< press 'f1' for menu >>>"
- 2480 print:print tab(12)"'f7' to proceed":printli$
- 2490 get r$:if r$=""then2490
- 2500 if r$=f1$ then380
- 2510 if r$=f7$ then2530
- 2520 goto2490
- 2530 on rt goto510,1110,1270,2030
- 2540 rem decimal placement
- 2550 v$=str$(int(v))+"."+right$(str$(v*100),2)
- 2560 if v=0 then v$="00.00"
- 2570 if gs then return
- 2580 v$="$"+right$(v$,len(v$)-1)
- 2590 if v<0then v$="("+v$+")"
- 2600 return
- 2610 v$=str$(int(v))+"."+right$(str$(v*10),1):return
- 2620 print"[147]program over - to restart without loss"
- 2630 print"of data, enter 'goto 380'"
- 2640 end
-