VIEW also has a third set of commands which are entered in text mode, but do not have any effect at all as they are entered. These are stored commands, and their purpose is to influence the way the document is printed.
Perhaps the most obvious in its effect is PE, which means 'page eject'. This is a command to the printer to stop printing and eject the page.
Stored commands are used in text mode, and they appear in the left margin, under the two dots to the left of the ruler. It is as if they were marginal notes, telling the printer what to do as it progresses down the text.
The stored command page eject would be entered like this:
- Position the cursor on the line where you want the command.
- Press EDIT COMMAND ( SHIFT f8 ).
- The cursor moves into the left margin.
- Type PE RETURN .
When the file is printed, as soon as the printer comes to the line on which you entered PE the page will eject.
Some of the other stored commands are used like this, some with numbers beside them, and some with text. For example suppose you want to tell the printer to work to a page length of 45 lines. The stored command for this is PL (page length) and it is entered in the margin just like PE. Beside it on the same line goes the number of lines: PL 45.
- Press EDIT COMMAND ( SHIFT f8 ).
- The cursor moves into the left margin.
- Type PL RETURN .
- Type 45.
Similarly if you want to centre the words 'The European Community' on a line, you can do so by typing it on the left and placing the stored command CE beside it, like this:
CE The European Community
If you want to range text to the right, as for example with instructions on a form, you would use the stored command RJ like this:
RJ Membership subscription £..........
RJ Handbook £..........
RJ Badge £..........
RJ Magazine £..........
RJ ___________
RJ TOTAL £__________
The effect when printed would be:
Membership subscription £.......... Handbook £.......... Badge £.......... Magazine £.......... ___________ £__________
Line spacing can also be controlled with stored commands. VIEW normally assumes solid text, but if you want part of your document with extra spacing between the lines you can use the command LS followed by the number of lines spacing, eg LS 2.
- | ) | |
- | )T op margin, four lines | |
- | ) | |
- | ) | |
Creative Graphics - First draft | - | Header, one line |
- | ) | |
- | )Header margin, four lines | |
- | ) | |
- | ) | |
Lissajoux figures | ||
Lissajoux figures are fascinating patterns that can | ||
form the basis for many weird and wonderful | ||
programs. The method for drawing Lissajoux figures | ||
is similar to the polar-coordinate method for | ||
drawing a circle. | ||
For the circle, the angle from which the x- and | ||
y-coordinates are derived is the same. Different | ||
Lissajoux figures are obtained when these angles | ||
are out of phase. | ||
There are many ways in which the basic Lissajoux | ||
patterns can be enhanced. Here is a program that | ||
uses straight lines to join the points that trace | ||
out two intermeshing figures. The pattern obtained | ||
depends on the random numbers chosen at lines 50 | ||
and 60. | ||
- | ) | |
- | )Footer margin, four lines | |
- | ) | |
- | ) | |
Page 25 | - | Footer, one line |
- | ) | |
- | )Bottom margin, four lines | |
- | ) | |
- | ) |
Of course all these spacings can be changed and the headers and footers themselves can be cancelled if you wish. Remember that once you define a header or footer, VIEW will continue to print it until you issue other instructions. So if you define your header as 'CHAPTER 3' you will have every page after that headed 'CHAPTER 3' until you redefine the header as 'CHAPTER 4'.
The illustration shows a page from a guide to the spreadsheet package 'ViewSheet'. To make up this page all spacings have been reset, and headers and footers have been redefined.
The top margin has been reset to three spaces, instead of the default four, by the stored command TM 3 which is used in the same way as the page length command described above.
The header margin, ie the lines between the header and the text, has also been reset with HM 3. Footer and bottom margins have been similarly reset to two and three lines respectively with the commands FM 3 and BM 2.
The header has been defined so as to display both the title of the book and the title of the section. Headers always have three components: left, centre and right.
The define header command is DH, and when this is used it must always be followed by the three components divided by spacers (normally the slash /). If one of the components is blank, simply place two slashes together. So the general rule is:
DH /left component/centre component/right component/
In the present case the header would have left and right components but no centre:
DH /ViewSheet Guide//11. Bar Charts/
Footers can be set in exactly the same way as headers, and also have left, centre and right components.
Once a header or footer has been defined VIEW will print it on every page until it is cancelled. To cancel a header use the stored command:
HE
To cancel a footer use:
FO 0
The Guide goes into all this in more detail.
In fact it is possible to set number register P to the number of your first, and it will automatically increase by one every time the printer completes a page. All you have to do then is to define your footer so as to print out the value of P and your page number will be printed automatically.
To set register P to value 1 for the first page, use the stored command SR (set register), like this:
SR P 1
You have then only to define the footer as the value of P. In order to distinguish between the character P and the value of register P you must place the vertical line symbol in front of it. So the footer is defined as:
DF //|P//
That is to say: no left component, centred page number, no right component.
Other stored commands which can cause number registers to be printed out are: DH (define header), CE (centre), RJ (right justify) and LJ (left justify). In fact the command LJ exists simply for the purpose of printing out registers, since VIEW always justifies left unless told to do otherwise.