206
Format 2: Specify Source File by Serial Filename
MERGE filename$
You can use a serial filename to identify it as the source for the MERGE (instead of
opening it and referring to the channel).
Example
The following is a sample terminal session using the MERGE directive to combine
two programs:
0->LOAD "TIME.PRT"
->LIST
1000 REM Time output routine
1010 T$=STR(INT(TIM)*100+FPT(TIM)*60:"00:00")
1020 RETURN
->SERIAL "WORKFILE"
->OPEN (1)"WORKFILE"; LOCK(1)
->LIST (1)
->CLOSE (1) ! WORKFILE has list of program
->LOAD "PASS.CTRL"
->LIST
0010 GOSUB 1000; PRINT "1st pass: ",T$
0020 CALL "PASS1"
0030 GOSUB 1000; PRINT "2nd pass: ",T$
0040 CALL "PASS2"
0050 GOSUB 1000; PRINT "End both: ",T$
0060 STOP
->OPEN (1)"WORKFILE"
->MERGE (1)
->CLOSE (1)
->LIST
0010 GOSUB 1000; PRINT "1st pass: ",T$
0020 CALL "PASS1"
0030 GOSUB 1000; PRINT "2nd pass: ",T$
0040 CALL "PASS2"
0050 GOSUB 1000; PRINT "End both: ",T$
0060 STOP
1000 REM Time output routine
1010 T$=STR(INT(TIM)*100+FPT(TIM)*60:"00:00")
1020 RETURN
See Also