In our never-ending efforts to improve and simplify the creation and editing of files, we have added UPDATE, DUPLICATE, and other options. Here’s one more. There may be many cases where you want to put the same data in different files, but UPDATE is not appropriate. The following changes allow you to input a set number of characters (up to 32) which will be added to a file in any position at the press of two keys (symbol shift and “I” which results in “AT”).
When at the main menu, enter “EDIT” and then you will be prompted to enter the edit phrase. Once entered, it is retained until you use UPDATE or load in your master copy again. Since UPDATE uses the variable P$ to hold the data to change and this routine uses it to hold the edit phrase, you need to keep track of what you are doing or you may be putting in information you don’t want.
Whenever you add or edit a file, just place the cursor where you want the phrase to begin and press symbol shift-I (the AT token) and the phrase will instantly appear. If in OVER mode, the phrase will cover any data already there. If you have a 20 character phrase and try to put it in starting in column 25, you will cut off most of the phrase at the end, of course. If you are in INSERT mode, the characters on the line from the cursor position to the end will be moved to the right. Anything moved past the last column is cut off and lost forever (always have backups of data!).
Again, there are many situations where this would be useful. In my case, I always put the date on each order I receive. If I have to do very many files in one day, this makes things much easier.
Here are the changes:
100 LET T1=O: INPUT "SEARCH COMMAND? ";X$: IF X$="NN" THEN GO TO VAL "9998"
101 IF X$="EDIT" THEN INPUT "EDIT PHRASE: ";P$: GO TO U
5028 IF Y$="AT " AND I THEN LET Q$=E$(L+1,C+2 TO ): LET E$(L+1,C+1 TO )=P$+Q$: PRINT AT L,O;E$(L+1): LET C=(C+LEN P$)*(C+LEN P$<31): GO TO 5035
5029 IF Y$="AT " AND NOT I THEN LET Q$=E$(L+1,C+1+LEN P$ TO ): LET E$(L+1)=E$(L+1, TO C)+P$+Q$: PRINT AT L,O;E$(L+1): LET C=(C+LEN P$)*(C+LEN P$<31): GO TO 5035
5030 PRINT AT L,C;Y$: LET E$(L+1,C+1)=Y$: LET C=(C+1)*(C<31)
5035 LET L=L+(C=O AND L<14): FLASH 1: PRINT AT L,C;SCREEN$ (L,C)
9996 DIM D$(VAL "27529"): LET P=VAL "29": LET P$="": LET O=NOT PI: LET B=O: LET U=SGN PI: LET H=U+U: LET F=H+H: LET G=VAL "7": LET K=VAL "10": LET J=VAL "15": LET Q=CODE " ": LET R=VAL "256":LET A$="ALL": LET C$=CHR$ O: FOR X=U TO J: LET C$=C$+CHR$ X: NEXT X: LET S=O: LET D$(K+K TO VAL "29")=CHRS U+"SET DATE*"