How many of you download large text files from time to time? Sometimes you would like to load one of these files into your word processor before printing it. Maybe you would like to edit out the typos you noticed when you looked it over on screen. Or maybe you would like to reformat it into two columns. Or whatever. Usually this is no problem. But sometimes the file is so large that it cannot be loaded all at once.
AtariWriter Plus will load as much as it can, but then there is no way to access the remainder of the file. What is needed is a way to split the file into two or more parts that can be loaded individually, edited, chained together, and then printed. Fortunately, the MFACC library has a program that will split the file for you. It's called DIVIDTXT.EXE, and it's in the public domain.
The program works with multiple drives and asks you for the complete file specification (or will display a disk directory, if needed). Then you are prompted for the destination filespec. Don't use an extender, as the program will automatically use the extender to number the new files sequentially. Then you are asked for the desired size of the split files. The maximum filesize is 24,000 bytes.
Now just sit back while DIVIDTXT splits your textfile into digestible chunks.
Many times an ASCII file will have hard returns at the end of each line, and it's rather tedious to remove them from within your word processor if you want to reformat. Guess what? There's another program that will do that little job for you. This is a short BASIC program that is also in the MFACC library (STRIPRET.BAS). For your convenience, I am including the listing in this column. You can easily type it in and have it immediately available. Be sure to give your destination file a different name from the source file if you are writing it to the same disk!
If you have Turbo BASIC, you probably also have Dave Yearke's public domain program, Text Tidier. This dandy program will not only split textfiles and remove unwanted hard returns; it will also remove excess spaces used for justification and convert all those MS-DOS CTRL-M CTRL-J combinations to ATASCII 155's. Any or all of these features may be used with your file. In addition it will write the "chain next file" command (for AtariWriter Plus or PaperClip) at the end of all files except the last one. Complete documentation is on the Turbo BASIC disk, side B.
Incidentally, if you dabble in BASIC programming, but have not tried Turbo BASIC, what are you waiting for? You will love all the extra commands (DPOKE, PAUSE, RENUM, etc.), the increased speed, plus the ability to compile most BASIC programs (Turbo BASIC or Atari BASIC). Best of all, the price is right for this cream-of-the-crop public-domain program from 1986!
10 REM ** CARRIAGE-RETURN STRIPPER ** 20 REM 30 DIM SOURCE$(15),DEST$(15) 40 GRAPHICS 0:POKE 82,2:? :? " CARRIAGE-RETURN STRIPPER":? :? 50 ? "Name of source file (include device)":INPUT SOURCE$:? 60 ? "Name of destination file (include device)":INPUT DEST$ 70 ? :? " Working. . .":? :? 80 OPEN #1,4,0,SOURCE$ 90 OPEN #2,8,0,DEST$ 100 TRAP 130:GET #1,A:IF A=155 THEN 140 110 PUT #2,A 120 GOTO 100 130 PUT #2,155:END 140 GET #1,A:IF A<>155 THEN PUT #2,32:PUT #2,A:GOTO 100 150 PUT #2,A:PUT #2,A 160 GET #1,A:IF A=155 THEN PUT #2,A:GOTO 160 170 GOTO 110