
forthemacro:one to defineit,and one to use it.They are
given in the Table 6-9.
Table
Macro instruction commands
Function | Control code |
Definemacro
Usemacro
To see how this works we the printing style to normal, to start with. The following do this.
<ESC > “ + ” ... (codes you include)
... CHR%(30)
<ESC > “ + ” CHR$( 1)
can build a macro that will reset no matter what style it may be program will define a macro to
10 | LPRINT CHR$(27);“+“; | ‘Start macro |
20 | LPRINT CHR$(27);“h”;CHR$(O); ‘Big character off | |
30 | LPRINT CHR$(~~);“!“;CHR$(O); ‘Select normal pica | |
40 | LPRINT CHR$(27);“T”; | ‘Super & subscripts |
| off |
|
50 | LPRINT CHR$(27);“a”;CHR$(O); | |
| printing |
|
60 | LPRINT CHR$(30) | ‘End macro |
| definition |
|
As the comments in the program show, we started to define 1the macro in line 10. Line 20 cancels big character printing.
Line 30 sets normal pica, and this command also cancels proportional pitch, condensed print, expanded print, boldface, emphasized, italics, and underlining. Line 40 cancels super- scripts and subscripts. Line 50 sets
Now that you have defined a macro, let’s see how to use it. This program will print one line using several printing features. Then it “calls” the macro in line 60. When line 70 prints the style is “plain vanilla” because the macro has reset it.