home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
mlpc
/
mergecre.bas
< prev
next >
Wrap
BASIC Source File
|
1983-11-16
|
2KB
|
50 lines
10 CLS
20 PRINT:PRINT"MERGECRE - IBM BASIC VERSION OF 07/09/83"
30 PRINT:PRINT"COPYRIGHT (C) 1983 BY L. H. GENTRY"
40 PRINT:PRINT"COMPARES TWO ASCII BASIC FILES AND CREATES A THIRD "
50 PRINT "FILE WHICH MAY BE USED AS A MERGE FILE"
60 PRINT"-------------------------------------------"
70 NULL$="":SETUP$="":LW=80
80 PRINT "Enter output disk file specification, SCRN:, LPTn:, or CAS1:"
90 INPUT FILE$:
100 PRINT
110 IF FILE$="SCRN:" THEN LW=80:GOTO 190
120 IF NOT ((LEFT$(FILE$,3)="LPT") AND (RIGHT$(FILE$,1)=":")) THEN 190
130 INPUT "Enter number of characters per line";LW
140 PRINT "Enter control string for printer setup (use ALT & numeric key pad)"
150 PRINT "TERMINATE SETUP STRING WITH A CARRIAGE RETURN (ENTER)"
160 B$=INKEY$:IF B$="" THEN 160 ELSE IF B$=CHR$(13) THEN 180
170 SETUP$=SETUP$+B$:GOTO 160
180 INPUT "PRESS CARRIAGE RETURN (ENTER) WHEN PRINTER IS READY";ZZ
190 OPEN "O", #2, FILE$:IF SETUP$<>"" THEN PRINT #2,SETUP$
200 INPUT "Enter ORIGINAL File Specification";IFILE1$
210 X=INSTR(IFILE1$," "): IF X=0 THEN IFILE1$=IFILE1$+".BAS"
220 PRINT
230 INPUT "Enter CHANGED File Specification";IFILE3$
240 X=INSTR(IFILE3$," "): IF X=0 THEN IFILE3$=IFILE3$+".BAS"
250 OPEN "I",#1, IFILE1$
260 OPEN "I",#3, IFILE3$
270 SKIP = 1
280 IF EOF(1) AND NOT EOF(3) THEN 410
290 IF NOT EOF(1) AND EOF(3) THEN 450
300 IF EOF(1) AND EOF(3) THEN CLOSE:END
310 IF SKIP THEN LINE INPUT#1,L1$:LINE INPUT#3,L3$
320 LN1= VAL(LEFT$(L1$,INSTR(L1$," ")))
330 LN3= VAL(LEFT$(L3$,INSTR(L3$," ")))
340 PRINT LN1;LN3
350 IF LN1<LN3 THEN PRINT #2,LN1;"'":LINE INPUT#1,L1$:GOTO 280
360 IF LN3<LN1 THEN PRINT #2,L3$:LINE INPUT#3,L3$:SKIP=0:GOTO 280
370 SKIP = 1
380 IF L1$=L3$ THEN 280
390 PRINT #2,L3$:GOTO 280
400 '
410 LINE INPUT#1,L1$
420 LN1= VAL(LEFT$(L1$,INSTR(L1$," "))
430 PRINT #2,LN1;"'":GOTO 280
440 '
450 LINE INPUT#3,L3$
460 PRINT #2,L3$:GOTO 280
VAL(LEFT$(L1