Edit To Add or Add To Add

Authors

Publication

Pub Details

Date

Pages

See all articles from Extensions issue 2

When adding or editing a file you can close it using the token ” TO ” and you will go to a blank screen where you can add another file instead of returning to the menu.

It may be a good idea at this point to make up a little card which you can keep by the computer to help you remember all the new commands from the manual and this newsletter:

Main Menu

  • NN: New Name
  • RST: Restart
  • T: key tick

Special Searches

  • U for Update
  • T for Tally

Edit Menu

  • STEP: Edit to Next
  • TO: Edit to Add or Add to ADD
  • THEN: Print file being edited

Display Menu

  • > Middle search
  • >= Middle search with Printer output

Now make the following changes to the program (remember from the first issue that you can save memory using VAL, CODE, and using variables: all will be used in the following lines so I hope you added the variables from the first issue) If you didn’t, remember U=1, O=0 (zero), G=7, J=15, F=4:

5 IF INKEY$=" " THEN ON ERR GO TO VAL "9400": PRINT AT VAL "21",O; FLASH U;"BREAK TO EXIT/ENTER TO CONTINUE ": PAUSE 0: GO TO F+U
6 BORDER 0: PAPER 0: LET Y=O: DIM E$(J,CODE " "): CLS
9 IF J$="U" THEN LET X$=X$: GO TO CODE "w"
10 IF Y$="D" OR Y$=" STEP " THEN POKE VAL "64022",PEEK VAL "64026": POKE VAL "64023",PEEK VAL "64027": LET B=(PEEK VAL "64024"+VAL "256"*PEEK VAL "64025")+B: POKE VAL "64024",B-VAL "256"*INT (B/VAL "256"): POKE VAL "64025",INT (B/VAL "256"): GO TO VAL "150"
145 IF A=O THEN IF J$="U" THEN LET Z$="0": LET A=U: LET Y=O: LET Y$=" STEP ":INPUT "WHICH LINE TO CHANGE? ";P$: INPUT "WHAT IS NEW DATA? ";Q$: IF LEN Q$<U OR LEN Q$>CODE " " OR L<U OR L>J THEN LET A=O: GO TO VAL "145"
1010 IF (A=O OR J$="U") AND E$(U, TO VAL "18")=D$(U+U TO J+F) AND B<>P THEN CLS : GO TO VAL "1500"
1056 IF Y$=">" OR Y$=">=" THEN LET L=PEEK VAL "64022": LET C=PEEK VAL "64023": INPUT "NEW SEARCH COMMAND? ";X$: IF X$="" THEN GO TO VAL "1056"
1057 IF Y$=">" OR Y$=">=" THEN IF X$(LEN X$)=" AND " OR LEN X$>CODE" " THEN GO TO VAL "1056
1058 IF Y$=">" OR Y$=">=" THEN LET X$=X$: RANDOMIZE USR VAL "64046": POKE VAL "64022",L: POKE VAL "64023",C: LET Y=Y$=">=": LET Y$="": IF B<P THEN CLS : LET T=O: LET T0=O: LET T1=O: GO TO VAL "130"
4000 LET P=P-USR VAL "63640": LET B=P: IF Y$="D" THEN LET Y$="": GO TO U
5016 LET Y$=INKEY$: IF Y$>=" TO " THEN ON ERR RESET : FLASH 0: GO TO 6000
6000 IF J$="U" THEN LET D$(P)=CHR$ (VAL "42"-A*VAL "42)
6001 FOR X=U TO J
6020 LET P=USR VAL "63530": LET B=P-B
6030 GO TO F-(Y$=" STOP ")+(A*(Y$=" STEP "))+(VAL "4996"*(Y$=" TO "))
8585 LET P=P-USR VAL "63640": GO TO VAL "9300"
9100 IF J$="U" THEN LET T1=T1/VAL "2"
9105 PRINT AT J,O;"CNT=";T1;: IF J$="T" THEN PRINT " SUM1=";T;" SUM2=";T0
9300 IF P$=E$(L, TO LEN P$) THEN LET E$(L)=Q$+E$(L,LEN P$+U TO ): PRINT AT L-U,O;E$(L)
9310 GO TO VAL "6000"
9400 PAUSE VAL "20": LET Y$=" STOP ": ON ERR RESET : GO TO U
9996 LET P=VAL "20": DIM D$(VAL "28020"): LET O=NOT PI: LET B=O: LET U=SGN PI: LET G=VAL "7": LET J=VAL "15": LET F=VAL "4": LET D$( TO P)="*SEARCH IS COMPLETE*": LET A$="ALL": LET C$="": FOR X=U TO J: LET C$=C$+CHR$ X: NEXT X: LET S=O

Now to fix some bugs. If vou added the enhancement from the manual which avoids LPRINTing blank lines you will find it will not always work properly (if you purchased an enhanced version from Tom Woods it may be okay). Change the following:

7220 IF CODE C$(X) THEN IF E$(CODE C$(X))>"                                " THEN LPRINT E$(CODE(C$(X))

A further improvement in the editing routine is shown below. It should completely eliminate the times when you press a Key but it fails to appear on the screen.

5010 LET Y$=INKEY$: IF Y$="" THEN GO TO 5010
5016 IF T$>=" TO " THEN ON ERR RESET : FLASH 0: GO TO 6000

Another problem occurs when editing a line which has a character in the last position of that line. If you delete апу characters within the line, the last character is also deleted! Make this correction:

5112 LET E$(L+U)=E$(L+U, TO C)+E$(L+U,C+U+U TO ): PRINT AT L,O;E$(L+U): GO TO VAL "5108"

I hope these routines help you as much as they help me. If vou have any problems, please let me Know. I know my newsletter is not very pretty, but looks will have to wait until I develop a large enough market to support professional printing. I try to provide the things I would want from a company: fast response (orders go out within 24 hrs, but usually the same day) and useful information of course.

I would appreciate any ideas you may have for further improvements to Profile.

Products

Downloadable Media

 
Scroll to Top