Additional Display Features
More on the -write- Command
It should be pointed out that the -at- command not only specifies a screen position for subsequent writing but also establishes a left margin for “carriage returns” (CR on the keyset), much like a typewriter. Upon completion of one line of text, the next line will start at the left margin set by the last -at- command. There are carriage returns implicit in “continued” write statements:
The “at 1215” establishes a left margin at the 15th character position so that each line will start there. This example will produce an aligned screen display similar to the appearance of the tags of this continued -write- statement.
The setting of a margin by -at- has an unusual side effect. Consider:
This will put the following display on the screen:
This unusual display is caused by the setting of the left margin at character position 63, just two characters shy of the right edge of the screen. When a -write- would go past the right edge of the screen, TUTOR performs a carriage return to drop down one line, starting at the left margin. An -arrow- also sets a left margin with respect to the student typing a long response which would pass the right edge of the screen. Further typing appears on the next lower line starting at the margin set by -arrow-.
Occasionally, it is useful to position something on the screen without setting a margin. This can be done with an -atnm- command (“at with no margin”). The statement “atnm 1215”, is equivalent to “at 1215”, but does not change the current margin setting.
It is important to understand that writing characters on the screen automatically advances the terminal's current screen position. Suppose we have consecutive -write- statements:
This sequence will display “horseand cows” all on line 7. The first -write- (“horses” ) advances the terminal's screen position from the 712 specified by the preceding -at- to 712+6=718 (there being 6 characters in the text “horses”). Without an explicit -at- to change this, the second -write- (“and cows”) starts at position 718. Note that:
would give a different display:
because the “continued” -write- statement implies carriage returns.
TUTOR keeps track of the current screen position in a system variable named “where”. For example:
will produce the display:
The statement “write horses” leaves the screen position at 712+6=718, and the system variable “where” therefore has the value 718. When you then say “at where +305” this is equivalent to saying “at 718+305” or “at 1023”.
There are many uses of this “where” system variable. Here is another example:
The arrow has been positioned 3 characters beyond the end of the -writestatement's display.
The positioning information is useful with other display commands as well. Consider this:
This will display underlined text:
This is due to the fact that upon completion of the -write- statement, “where” refers to the beginning of the next character position just after the exclamation point. We simply draw from there back to the starting point. This form of the -draw- statement is so common that a concise form is permitted. For example, “draw ;815” is equivalent to “draw where;815”. Either form will draw a line or figure starting at the current screen position. This is particularly useful in constructing a graph (by connecting the new point to the last point with a line). The point reached with a -draw- (or any display command) will be the new screen position and may be referred to through the system variable “where”, which is kept up to date automatically by TUTOR.
There are fine-grid system variables “wherex” and “wherey” which correspond exactly to the coarse-grid “where”. The position “where+305” is equivalent to “wherex t-(5 x8),wherey-(3 x 16)” because a character space is 8 dots wide and 16 dots high. The minus sign is present because, in coarse grid, line 4 is below line 3, whereas in fine grid dot 472 is above dot 471.
Superscripts and subscripts may be typed either in a locking or nonlocking mode. To type “1023” you can either: (a) press 1, press 0, press SUPER, press 2, press SUPER, press 3 (non-locking case); or (b) press 1, press 0, press shift-SUPER (that is, hold down the shift key while pressing SUPER), press 2, press 3. To get down from a locked superscript you type shift-SUB (locking subscript). Notice that in typing superscripts or subscripts the SUPER and SUB keys are pressed and released before typing the material to be moved up or down. You do not hold these keys down while typing, unlike the shift key used for making capital letters.
It is possible to overstrike characters to make combinations. The symbol “v” can be made by typing v, backspace, SUPER, minus sign. This will superimpose a raised minus sign above the v. The backspace is typed holding down the shift key while hitting the wide space bar at the bottom of the keyset. Similarly, “horse” can be typed by typing “horse” followed by five backspaces and five underline characters. Note that these superpositions of characters won't work in “mode rewrite”, where a new character is written on the screen. In mode rewrite, the last example would show up as “ ”, the “horse” having been wiped out by the characters whose only visible dots are the low, horizontal bars.
We've seen examples of lower-case and upper-case characters, numbers, punctuation marks, superscripts, and subscripts. What if you need special accent marks, or an unusual mathematical symbol, or the entire Cyrillic alphabet for writing Russian? It is important that you be able to write text on the screen using the special symbols of your particular subject area. In addition, it is possible to use special characters to display small, intricate figures whose display would be slow and cumbersome if done with -draw- commands.
The PLATO terminal has 126 built-in characters (including those used so far) and storage for 126 additional characters which can be different in every lesson. For example, Russian lessons fill this additional character storage space with the Cyrillic alphabet, whereas there is a genetics lesson which fills the storage area with fruitfly parts which permit displaying flies by writing appropriate characters at appropriate positions on the screen. We will learn how to access all 252 characters (126 which are built-in and 126 which can be varied).
he 126 built-in characters include many useful symbols which do not appear on the keyset (since there aren't enough keys). This is due to the fact that the keys on the right of the keyset are reserved for various important functions (ERASE, BACK, STOP, etc.). In order to access the “hidden” characters it is necessary to first strike the ACCESS key (presently the shift-□ key) and then to strike a second key. Like SUPER and SUB, the ACCESS key is not held down but struck. You can press ACCESS, then “a” to get a Greek alpha; ACCESS-b for beta; ACCESS-m for mu; ACCESS-= for ≠ and also ACCESS-< or > for ≤ and ≥. It is useful to try ACCESS followed by every key (or shifted key) at a terminal to find approximately 36 useful hidden characters. In most cases, there is a mnemonic connection between the key which follows the ACCESS key and the hidden character which results, such as ≠ being ACCESS-=. ACCESS followed by comma gives the symbol ↕ mentioned in the discussion of the -writec- command in Chapter 6. ACCESS-0 and ACCESS-1 give the symbols ⊀ and ⊁ used for embedding -show- commands in -write- statements. (In the discussion of “micro tables” later in this chapter, we will see that the MICRO key is equivalent to the ACCESS key, under normal circumstances.)
You can get at the “alternate font” of 126 additional, modifiable characters by pressing the FONT key (the shifted MICRO key), then typing regular keys, which will produce characters from the alternate font. Which characters appear depends on what character set has been previously loaded into the terminal. The FONT key toggles you between the standard built-in font and the alternate font (you stay in the alternate font until you strike FONT to return to the standard font). It is, therefore, not necessary to strike FONT for each symbol (unlike the way ACCESS works).
Here is an example of the use of a special character set:
The -charset- statement sends to the terminal the character set specified in the tag (character set “charsets,russian” in this case). Character patterns are transmitted to the terminal at a rate of 7.5 character patterns per second, so a full 126-character set will take about 17 seconds to send. Precede the -charset- command with a -write- statement to explain this delay to the student, so that he or she will not think that something is wrong or broken! The full-screen -erase- will remove the message upon completion of the loading process. Once the character patterns have been loaded into the terminal, it is possible to write Russian text on the student's screen at the same high speed as English, 180 characters per second, which corresponds to a reading speed of almost two thousand words per minute.
TUTOR keeps track of which character set has been loaded into the terminal and skips a -charset- statement if loading is not required. In the above example, TUTOR would rush right through the message, skipping the -charset- and erasing the screen. There would not be the 17-second delay which occurs if the Cyrillic characters have not been loaded.
The -write- statement in unit “intro” is created by:
- typing “write The Russian word”;
- striking the FONT key to select the alternate font;
- typing the keys k, a, r, a, n, d, a, w (which causes карандаш to appear)
- striking the FONT key to toggle back to the standard font
- typing “ means pencil.”
Each character in the alternate font is associated with a key on the keyset. For example, the creators of the “russian” character set chose to associate the Cyrillic “ A ” with the “d” key because of the phonetic similarity of these two letters. Similarly, the Cyrillic “p” and “H” sound like the “r” and “n” letters with whose keys they are associated. Just as accessing some of the 126 built-in characters requires the ACCESS key, so a full 126-character alternate font will also necessitate the use of the ACCESS key to reach some of the characters.
If the student is to respond at an -arrow- with a Russian response, he or she must hit the FONT key in order to do so. Usually it is preferable to precede the first judging command with the statement “force font”, which essentially hits the FONT key for the student. The student merely uses the regular typing keys, but the typing appears in the alternate font. Some languages, including Arabic, Hebrew, and Persian, are written right-to-left instead of left-to-right. For these languages use a “force font,left” and the student's typing will automatically go leftwards from the -arrow- in the alternate font.