1 GOTO90;'Search & Replace S A French 72275,1622 01/01/85 10 IFEOF(1)THENCLOSE:KILLDF$:NAME"TEMP$$.DO"ASDF$:MENU ELSEP=1:OS$="":LINEINPUT#1,IS$ 14 M=INSTR(P,IS$,SS$):IFM=0THENOS$=OS$+MID$(IS$,P):GOTO20 15 M=M-P:OS$=OS$+MID$(IS$,P,M):IFQ=0THENOS$=OS$+RS$ ELSEGOSUB30:IFI<3THEN OS$=OS$+SS$ ELSEIFI<5THENOS$=OS$+RS$ ELSE40 16 P=P+LEN(SS$)+M:IFP2THENQ=1 ELSEQ=0 94 CLS:LINEINPUT"SEARCH STRING ";SS$:IFLEN(SS$)=0THENMENU 96 LINEINPUT"REPLACE STRING ";RS$:OPENDF$FORINPUTAS1:OPEN"TEMP$$.DO"FOROUTPUTAS2:CLS:GOTO10 100 'This program can be used for global search and replace in a Model 100 .DO file. 101 'When the program is run,it will show you the directory and ask for a .DO file to process. 102 ' 103 '(A)uto - Will search for a string,then replace it. It will 104 'continue to do this until the end of the file,then exit to the menu. 106 '(Q)uery - Will search for a string,then display it in context and" 107 'ask if you want to (R)eplace it,(S)kip to the next one,or (Q)uit 108 'processing the file. It will continue to do this until the end of the file, then exit to the menu. 109 ' 110 'You will be asked for the search string (string to be look for), and the replace string (to replace the search string). 111 ' 112 'A maximum of 255 char strings are allowed in the .DO file. 113 'A TEMP$$.DO file will be created,then killed during operation. 114 '1988 Bytes with comments. 116 ' 729 Bytes in Basic with lines 100-116 removed.