100 '
110 REM THIS PROGRAM WILL REMOVE ALL REM STRINGS FROM
120 'A MBASIC PROG.
130 '
140 'THE INPUT BAS FILE MUST BE IN ASCII FORM ( SAVE "XXX",A )
150 'THE OUTPUT FILE WILL BE IN ASCII FORM
160 '
170 '          BY BILL WOOD, MISSISSAUGA
180 '
190 '
200 CLEAR 2000 
210 LINE INPUT "INPUT FILE NAME - ";F1$
220 IF RIGHT$(F1$,4)<> ".BAS" THEN PRINT "OUTPUT FILE MUST HAVE A EXT. OF .BAS":GOTO 210
230 OPEN "I",#1,F1$
240 LINE INPUT "OUTPUT FILE NAME - ";F2$
250 IF RIGHT$(F2$,4)<> ".BAS" THEN PRINT "OUTPUT FILE MUST HAVE A EXT. OF .BAS":GOTO 240
260 OPEN "O",#2,F2$
270 IF EOF(1) THEN 320
280 LINE INPUT #1,T$
290 GOSUB 500
300 PRINT #2,T$
310 GOTO 270
320 CLOSE #1,#2
330 PRINT:PRINT "INPUT FILE ";F1$;" WITH ALL REM REMOVED "
340 PRINT "WILL BY FOUND IN FILE ";F2$
350 PRINT
360 END
370 '
380 '
500 X=INSTR(T$,"'")
510 IF X=0 THEN 600
520 Y=INSTR(T$," "):Z=Y
530 IF MID$(T$,Y+1,1)=" " THEN Y=Y+1:GOTO 530
540 IF MID$(T$,Y+1,1)="'" THEN T$=LEFT$(T$,Z-1)+"'":RETURN
550 X1=1
560 X=INSTR(X1,T$,CHR$(34)):IF X>0 THEN X1=X+1:GOTO 560
570 X=INSTR(X1,T$,"'")
580 IF X=0 THEN RETURN
590 T$=LEFT$(T$,X-1)
600 X=INSTR(T$,"REM")
610 IF X=0 THEN RETURN
620 Y=INSTR(T$," "):Z=Y
630 IF MID$(T$,Y+1,1)=" " THEN Y=Y+1:GOTO 630
640 IF MID$(T$,Y+1,4)="REM " THEN T$=LEFT$(T$,Z-1)+"'":RETURN
650 X=INSTR(T$,":"+"REM ")
660 IF X=0 THEN X=INSTR(T$,":"+" REM ")
670 IF X=0 THEN RETURN
680 T$=LEFT$(T$,X-1)
690 RETURN
650 X=INSTR(T$,":"+"REM ")
660 IF X=0 THEN X=INSTR(T$,":"+" REM ")
670 IF X=0 THEN RE