APPENDIX C.
PRINT
a
181, MID*<CHK*(I>,
13,20)
1390 PRINT
3 194
i
"AMOUNT
OF CHECK:
PRINT
a 212, USING
"**###.##";
-CVN<RIGHT*<CHK*(I>,5)
)
1400
GOTO 1440
1410 PRINT
a
98?
"DATE OF
DEPOSIT:"
PRINT
a
117,LEFT*<CHK*<I>,8)
1420
PRINT
3
130,
"DEPOSIT
NUMBER:"
PRINT
a
149,MID*<CHK*(I),9,4>
1430 PRINT
3
162*
"AMOUNT
OF
DEPOSIT:
"
:
PRINT
3 1
80 , USING
"**###.
CVN<RIGHT*(CHK*<I>,5>
)
1440 PRINT
3290, "(PRESS
TO SEE NEXT"
1450 PRINT
3322?
"RECORD
OR
<R>
TO
RETURN
TO"
1460 PRINT
3
354,
"'SELECTIONS'
)"
A2*
=
INKEY*
IF A2*
=
CHR*<13>
IF
A2*
=
"R" THEN
GOTO 1470
##"
<
ENTER
>
1470
1480
1490
1500
THEN
1520
1510
1510 NEXT I
1520
1530
CLOSE #1
RETURN
SAMPLE PROGRAM #3
MEMBERSHIP
LIST
Want to
store the names and telephone
numbers of all
your
club members?
This program puts them all in a
disk file in
alphabetical order. Add a few lines to
it, and
it
will store
their addresses and phone
numbers also.
10
'
Create list and alphabetize.
20
'
30
'
The object of this program
is to create a
file of
40
'
alphabetically
arranged names
and
phone
numbers. The
50
'
names
and numbers
are first
input into an
array, ARRAY*
( I )
,
60
'
then
put into
alphabetical
order,
and finally
put into
70
'
a
disk file
called "NAMES/NOS".
The
file is 35 bytes
80
'
lor.9, all of it
allotted to
one variab 1 e,
INFO*. The
90
'
file can
be added to anytime
a f
t e r i t s c r e a t i o n a n d will
100
'
automatically be alphabetised.
The program can be used
110
'
in conjunction with the
"Search
a 1 i s
t
"
p r o g r a
m
(sampl
e
120
'
program #4)
.
130
7
140 CLEAR 1050
150 DIM ARRAY*<30)
160 OPEN "D",#l,
"NAMES/NOS", 35
170 FIELD
#1,35 AS
INFO*
180
•}
190
'
First the
file is
checked
to
2:.ee
if there are
any
200
'
records
currently on it.
210
t
220
IF
L0F(1)
=
THEN 1=1:
GO TO 310
230 FOR
1=1
TO
LOF(l)
240
GET #1,1
250
ARRAY* U)
=
INFO*
260
NEXT I
270
t
280
'
The new names
and numbers
are input and then
concatenated
290
into
1
stringi ARRAY* (I)
300
•J
310 CLS
320
PRINT a 64
330
INPUT "LAST NAME"?L*
340 INPUT
"FIRST NAME" 5 F*
350 INPUT "MIDDLE INITIAL" ; M*
360 INPUT
"AREA CODE"
5
A*
370 INPUT
"PHONE
NUMBER" ? P*
380
ARRAY*(I)
=
LEFT*<L*+"
,
"+F*+"
"
+M*+"
",24)+A*+P*
390 PRINT
a
288,
"MORE
DATA <Y/N>?"
400 AN*
=
INKEY*
410 IF AN*
=
"Y" THEN
1=1+1
:
GOTO 310
420 IF AN*
=
"N"
THEN
470
430
GOTO 400
440
•>
450
'
Then,
ARRAY*(I) is
put into
al pt
iabetical order.
460
'
470 FOR J=l TO I
480
FOR
K=J TO I
490 IF
ARRAY*
(J)
THEN 530
ARRAY* (K)
500
510
520
530
540
5 5
'
560
'
f
e r r e d
570
'
580 FOR
N=l TO
590 L.SET
INFO*
600 PUT
#1,N
TEMP*
=
ARRAY* < J)
ARRAY*(J)
=
ARRAY*(K)
ARRAY* <K>
=
TEMP*
NEXT K
NEXT J
Fi nal 1 y , the
list
into
"NAMES/NOS".
t r a n s
-
ARRAY* (N)
70