COLUMNS - Version 2.0 - Compiled March 26, 1986 by Brian Hillis, Toronto, Canada This program is a more flexible version of the PC News Letter Generator that appeared in the March 1986 issue of Computing Now! magazine. The original code was written in BASIC by Steve Rimmer. However, that version was unmercifully slow..., almost to the point of being useless, especially for larger files. I modified and polished up the original code, added a few extra routines, and a nicer screen display, then compiled it with Microsoft's Quick BASIC. I hope you find it useful. COLUMNS takes your text files (or BASIC listings) and re-assembles them into narrower columns, just like you see in newspapers and magazines. The joy of COLUMNS is that it figures out which line of your text to put beside line 1, as it is printing, an so on down the page. There is no need to cut and paste. COLUMNS will even deal correctly with Wordstar files, but don't try to use it with embedded control character, such as are used in PC-Write or Brown Bag. It does, however, ignore PC-Write's "dot" commands. If your text editor or word processor puts "soft" carriage returns at the end of line, then you should be OK. However, it it inserts regular carriage returns/line feeds, such as PC-Write, then columns reads then that way and you may end up with your newly assembled text finishing in the middle of a line. If this is the case, then you should prepare your source file by removing all the unnecessary "returns". COLUMNS is very easy to use, and the compile version (COLUMNS.EXE) is fairly quick. The BASIC version (COLUMNS.BAS) is much slower, but I have included it so that you can make any modifications to the code to suit yourself. To start the program, simply type: [basica] columns The first prompt lets you pick control codes for one of four predefined printers. 1. Gemini 10, 15, etc. 2. Okidata 3. Star-IBM mode or Epson 4. Texas Instrument 855 Needless to say, these are the four printers that I use, so I have included them in the code. If you just press [ENTER], the default is Star-IBM or Epson. The next prompt lets you pick COMPRESSED (17 cpi), ELITE (12-15 cpi), or PICA (10 cpi). The answer to this prompt is used in conjunction with the previous one to initialize your printer when you print a hard copy of your newly assembled text. The default here is COMPRESSED. The next thing COLUMNS needs to know, is how many columns of text do you want to print across the page. Some experimenting with this, and the following prompts, may be necessary to get the correct appearance. The default is 2 columns. Next you will be asked how many spaces between columns. That's the amount of blank space between your columns of text. Default is 8 spaces. The next prompt asks you how many line you want printed on a page. A normal 11 inch page can take 66 lines of print (at 6 lines to the inch). However, you will want a margin top and bottom, so for generally pleasant appearance, keep the number of lines per page around 55-60. The default is 60. Next you will be asked if you want to display the assembly process on the screen. Watch this one about once. It is very slow, as COLUMNS displays 21 lines, just the way they will print. Then it scrolls its way through the entire text file. Really, this is a good idea because it gives you some indication of problem areas. COLUMNS runs many times faster if it doesn't have to write to the screen. You will get in the habit quickly of answering NO to this question. To help you along, NO is the default. COLUMNS will now ask you if you want your newly assembled columns of text printed out on your printer, or written to disk. If you select the printer, COLUMNS assembles each new page then prints it before going on to the next page. If you select disk, COLUMNS writes a new text file to disk for each page, named PAGE-1, PAGE-2, etc. The default is DISK. Next COLUMNS asks you how many HEADER and FOOTER lines you would like. You can have up to 5 of each. If you don't ask for any footer lines, COLUMNS will print a page number footer at the bottom of each page. Now you are given a chance to type in your HEADERS and FOOTERS. A ruler line will display at the top of the screen, indicating the number of columns across the page you can use for HEADERS. Type in the entire header line, then press [ENTER]. Do this for each header line. By default, COLUMNS only puts one blank line between the header and the first text line. So, if you want extra blanks, ask for more header lines, then make the last one or two nulls (just press [ENTER] without typing anything) to give you extra spaces. This whole exercise is repeated for the FOOTERS. If you don't want any footer lines, or the default page number, when your are asked for the number of footer lines, type 1, then make it a nul. When you type in the name of the source text file to be converted to columns, you can specify a drive , path and filename, up to 32 characters. Now COLUMNS goes to work examining you file, breaking it up into columns and pages. During the process it will keep you informed as to the page number it is working on, the line number on that page, and the number of bytes remaining to be converted. Don't forget if you asked for 55 lines per page and two columns, that will be 110 new lines (less the amount needed for headers and footers) to be converted before COLUMNS writes the file to your printer or disk. That's all there really is to it. If you have any suggestions or comment, please let me know. --------------------------------- Brian Hillis 240 Scarlett Rd, Suite 313 Toronto, Ontario M6N 4X4 Canada (416) 769-2251