2 Column Letter Writing

for the family using

GW-BASIC

Page 1 of the Last Book of GW-BASIC
Back to the GW-BASIC Table of Contents
All the way back to Frankenbook

Two column letters are sort of fun.  You can do it a grand 
ten lines of code.

What you do is put your computer into 40 column mode with 
the command "mode 40 25.  Two column letters generally 
requires 108 to 120 lines of data depending on what you want 
your margins to be.  You use the same methods as the single 
column letter with the exception that you load all your 
sentence lines into an array and print from there.
As i recall, each line is about 32 characters long with a 
middle column of about 3/8" of an inch +/-.

If you are going to do a lot of two column stuff, create an 
empty form (2column.frm) to call up for your letter, that 
way you will save a lot of time.  Personally, don't think 
there have ever been too many two column letters in my life 
so this program may not be very relevant for you either.
At best, it would make sort of nice family newsletter form 
or club news.  But... it certainly is not in competition 
with any bloatware word processor, but it is totally 
adequate for some purposes.  

1  '  a two column page by fhb4family
2 DATA "Dear Mother,
3 DATA "
4 DATA "How are you?  I am fine.  Just a
5 DATA "note to let you know that this
6 DATA "is a two column letter to you.
7 DATA "
8 DATA "You ask, why a 2 column letter?
9 DATA "Well, that is a good question.
10 DATA"And i know that you like to ask
11 DATA"good questions.  Mother's are
12 DATA"like that.  Actually, to answer
13 DATA"that question correctly, i have
14 DATA"to go back a few days when i up-
15 DATA"loaded some GW=BASIC files to
16 DATA"the internet as part of my web-
17 DATA"site.  What was missing were the
18 DATA"old multi-column files of long
19 DATA"ago.  How long ago?  Real long
20 DATA"ago. Now is the time for all
21 DATA"good men to take a nap.
.
.
.  108 to 120 lines of letter go in here
.
.
108
109 ' end of data
110 'ProgramStartsHere:
111 DIM A$(108)    'create string array that holds sentences
112 I=1            'set incrementing counter I to 1 (just to make sure)
113 WHILE I<109    'set incrementing parameter
114   READ A$(I)   'load data into array
115   I=I+1        'increment the counter
116   WEND         '^^^^^^^loop to load sentences into array
117 I=1            'reset counter to 1 again for 2nd while-wend loop
118 WHILE I<109    'set incrementing parameter
119   PRINT TAB(6) A$(I);:PRINT TAB(42)A$(I+54)  '2 column printing
120   I=I+1        'increment the counter
121   WEND         '^^^^^^^^loop to print 2 column sentences
122 ' save "2column.bas",a

You can add a Variable Assignment line to include:
   MT (margin top)
   2C (second column)
   ML (margin left)
   WA (wrap at)
   STSCADL (start the second column at data line)  :-)
and use code like
  MT=4: ML=6: 2C=42
        then
  FOR J=1 TO MT:PRINT:NEXT  'print blank lines at top of page
        and
  PRINT TAB(ML)A$(I);:PRINT TAB(2C)A$(I+STSCADL)
inserted into the proper place of your program.  these are just
suggestions. but for 2column printing just keep it as simple as
possible.  

To send the array to the printer you have to change ALL the PRINT
statements to LPRINT and don't forget to press enter afterwards
on that line.  If your printer doesn't output press the formfeed
and wait a few seconds, if nothing, press again.


TOP of page
Back to Index
GW-BASIC TOC
Hosted by www.Geocities.ws

1