A Memo Writing Program

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


1 'MemoPrinterProgram:
2 '      Prints Date and Time, Headings, Text by fhb rev'd 9/17/98
3 '
4 'PrintTimeDate:
5 DIM M$(12):COLOR 11,4:CLS
6 HR=VAL(LEFT$(TIME$,2)):D$=DATE$
7 IF HR>11 THEN AMPM$=" pm" ELSE AMPM$=" am"
8 IF HR>12 THEN HR=HR-12
9 IF HR=0 THEN HR=12
10 M$(1)="  January":M$( 2)=" February":M$( 3)="    March":M$( 4)="    April"
11 M$(5)="      May":M$( 6)="     June":M$( 7)="     July":M$( 8)="   August"
12 M$(9)="September":M$(10)="  October":M$(11)=" November":M$(12)=" December"
13 PRINT STR$(HR);":";MID$(TIME$,4,2);AMPM$;
14 PRINT TAB(62) M$(VAL(MID$(D$,1,2)));" ";MID$(D$,4,2);", ";RIGHT$(D$,4)
15 '
16 'DoTheMemoHeadings:
17 DIM A$(14)  'our array starts at 0 so there are 15 elements.
18 PRINT:PRINT:PRINT:PRINT:PRINT
19 PRINT TAB(30) "M E M O R A N D U M"
20 PRINT:PRINT:PRINT
21 PRINT TAB(10) "F R O M:  M A N A G E M E N T"
22 PRINT:PRINT:PRINT
23 PRINT TAB(14) "T O:  A L L   E M P L O Y E E S"
24 PRINT:PRINT:PRINT
25 '
26 'WriteTheMemo:
27 WHILE I<15
28   LINE INPUT"     >";A$(I)  'the empty space between lets you control
29   I=I+1                     'line length a bit better, adjust as necessary
30   WEND                      'depending on line length values from 5 to 9
31 WHILE J<15                  'work pretty well.
32   PRINT TAB(9)A$(J)         'same with tab() value.
33   J=J+1
34   WEND
35 '   SAVE"MEMO.BAS",A

You have to change all 15 PRINT Statements to LPRINT
to print the memo  or you can just change them all up
front, save the program, and do it that way.  Your call.

Here is an even simpler MEMO format, and in some ways
superior.

1 CLS:PRINT:PRINT:PRINT TAB(10)TIME$;:PRINT TAB(60)DATE$
2 PRINT TAB(30) "M E M O R A N D U M"
3 PRINT:PRINT:PRINT TAB(10) "FROM:  EMPLOYER NAME";
4 PRINT TAB(52) "TO:  ALL EMPLOYEES"
5 PRINT:PRINT:PRINT
6 PRINT TAB(10)"This year, please remember to take your free turkey home  "
7 PRINT TAB(10)"and not leave in your locker over the two week holiday    "
8 PRINT TAB(10)"vacation.                                                 "
9 PRINT TAB(10)"                                                          "
10 PRINT TAB(10)"Thank you all and have a nice vacation.                  "
11 '     save "memo2.bas",a
12 ' Don't forget to change all the PRINT's to LPRINT's
 

TOP
Index
GW-BASIC Table of Contents
Hosted by www.Geocities.ws

1