Tandy TRS-80 Owner Manual & Programming Manual page 86

Color computer disk system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

APPENDIX
C-
BM44,76;D16;R2S;U16;L28"
90
LINE
(32,
12)-(92, 12),PSET
100
LINE
(92,
12)~(100,20),PSET
11.0
LINE <0,0)-(60,20),PSET
120
LINE <200,20)-<255,0>,PSET
130
LINE
(200, 140)
-(255?
192),
PSET
140
LINE
(0,
192>-(32, 160),PSET
150
LINE <4,62>-<28,64),PSET
160
PAINT (120,4),
2,
4
170
PAINT
(20,
20),
2,
4
180
PAINT
(230, 20),
2,
4
190
PAINT
(120, 40),
2,
4
200 PAINT
(60, 16),
3,
4
210 PAINT
(20,
64),
3,
4
220 PAINT
(158, 124)
,4,4
230 PAINT
(42,
74),
4,
4
240 LINE (28,8)-(
144, 148),
PSFT
250 LINE
(64, 12) --(156,
122),PSET
260 LINE
(68,
12)-(156, 116),PSET
270 DRAW "BM144, 148;U38"
280 FOR 1=0 TO
9
290 DRAW "BM~8,28?U38"
300 NEXT
I
310 DRAW "BM56,40;U28?BM48,31
i
111
8
5
BM40,22"U10"
320 PAINT
(56,
84),
2,
4
330 CIRCLE(56,86),10,3,
.4,0,
.5
340 LINE (51,86)-(63,86)
,
PSET
350 DRAW "BM56,84;L4;E7?D8"
360 FOR
1=1
TO 32
370 CIRCLE
(120, 176), 1*2, 1/4, .25
380 NEXT
I
382 DRAW
"
BM232
,
1
76
5
U
1
00
;
R2
;
D
1
00
"
383 CIRCLE
(
232, 180)
,
15
,
4,
1
,
.
5,
384 CIRCLE
(232, 178)
,
6, 4, 2,
.
55
,
.
1
385 CIRCLE
(
232, 80)
,
15
,
4,
1
,
0,
.
5
386 CIRCLE
(
232, 82)
,
6, 4, 2,
.
1
,
.
55
390 AN*
=
INKEY*
400
IF
AN*
=
""
THEN 390
410 LOAD
"DISPLAY/BAS'SR
SAMPLE
PROGRAM
#8
BUDGETING
This organizes
your
finances
and
prints
out a journal
on
your
printer.
You
need a
line
printer
with a
line
length
of at least
80
characters
to
run
it.
10
'
Budget program
20
'
30
'
The object
of
this
program
is
to
build three direct access
40
'
files, one
a
listing
of a
balanced budget, another,
a
listing
50
'
of
transactions, and
the
third,
a
listing
of
the
updated
60
'
budget.
The
program allows
for
carryover from
the
previous
70
'
period's budget.
A
Journal
can
be
printed
out
giving
a
list
80
'
of
the
budget
,
expenses, and
balances.
(NOTE:
As
written,
90
'
this
program requires
a
printer
for
outputting
the
Journal.
100
'
However, with slight modifi-
cation,
it
could
be
used without
110
'
a
printer.
)
120
'
130
'
140
'
Main module
of
program
150
'
160 CLS
170
PRINT
3 106,
"SELECTIONS:"
180
PRINT
3 165, "1)
BUILD BUDGET"
190
PRINT
a 197, "2)
UPDATE
AN
ACCOUNT"
200 PRINT
3
229,
"3)
PRINT OUT
A
JOURNAL"
210 PRINT
3
261,
"4)
END JOB"
220 PRINT
3 329,
"1,2,3, OR 4?"
230 AN*= INKEY*
240
IF
AN*="" THEN 230
250 ON VAL(AN*) GOSUB 360,950,
1450, 1970
260 GOTO
160
270
'
280
'
This subroutine builds
the
budget file
(cal led
290
'
BUDGET.ORG), and builds
or
updates
the file
BUDGET. UPD
300
'
It
allows you
to
input the
start date
of
the
budget
310
'
and the total amount
yolt
have
to
divide
up
to
accounts.
320
'
Tentative amounts
are
entered
for
each account and
a
330
'
running balance
is
kept
to
advise you
of
the
amount
340
'
left
in
Your
total
budget.
350
'
360 OPEN
"
D"
,
#1
,
"
BUDGET/ORG"
,
5
370 OPEN "D",#2, "BUDGET/UPD"
,5
380 FIELD #1,5 AS OAMT*
390 FIELD #2,5 AS UPDAMT*
400 GOSUB 1810
410
IF
L0F(2)
=
THEN 470
420 FOR
1=1
TO
9
430 GET
#2,
I
440 AMT(I)
=
CVN(
UPDAMT*)
76

Advertisement

Table of Contents
loading

Table of Contents