EasyManua.ls Logo

Commodore 1570 - Page 70

Commodore 1570
132 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
340 GOSUB 1000
350 CLOSE3:CLOSEI5:END
1000INPUT#15,EN,EM$,ET,ES
1002 IF
EN<20
THEN RETURN
10 10
PRINTEM$:CLOSE3:CLOSE 15:END
To use the above program lines for the version with fixed length fields,
we
would
alter a
few
lines
as
follows:
BASIC 7.0:
100 INPUT"ENTER RECORD NUMBER";RE
110 :
120
DOPEN#3,
"MYRELFILE" ,L88
130 BL$ =
"(27
shited space chars)"
140
INPUT"NAME";
NA$
145
LN=LEN(NA$)
150 IF
LEN>27
THEN
140
155
NA$ = NA$ + LEFT$(BL$,27 - LN)
160INPUT"STREET";SA$
165
LN = LEN(SA$)
170 IF
LEN>27
THEN
160
175
SA$ = SA$ + LEFT$(BL$,27 -
LN)
189 INPUT"CITY & STATE"; CS$
185
LN=LEN(CS$)
190
IF LEN>23 THEN
180
195
CS$ = CS$ + LEFT$(B
L$
,23 -
LN)
200 INPUT"ZIP CODE";ZP$
205
LN
= LEN(ZP$)
210
IF
LN>
10
THEN 200
215 ZP$ = ZP$
+ LEFT$(BL$,
10-
LN)
220 DA$ = NA$
+ SA$ + CS$ + ZP$
260 :
270 :
280 RECORD#3,(RE), I
290 IFDS = 50THENPRINT#3,CHR$(255):GOSUB 1000:GOT0280
300 GOSUB 1000
310 PRINT#3,DA$
320 GOSUB1000
330 RECORD#3,(RE), I
340 GOSUB1000
350 DCLOSE#3:END
1000 IFDS<20 THEN RETURN
1002 :
10
10
PRINT"ERROR: "DS$:DCLOSE# ):END
62

Related product manuals