5. THE TEXT APPLICATION PROGRAM
The second of the five built-in programs listed on the menu is TEXT.
This is a text-editing facility, specifically designed for creating,
editing and storing files of text. It offers a good range of word-
processing facilities - search function, insertion and deletion of text,
word-wrap, cut and paste operations etc. Probably the first occasion the
user will have to use the TEXT program will be to create the files
ADRS.DO and NOTE.DO needed for the ADDRSS and SCHEDL applications (as
described in Chapters 6 and 7).
To access TEXT, position the cursor over the name TEXT in the main menu
and press <ENTER>. Alternatively, you may give the command:
TEXT<ENTER>
via the keyboard. This will appear at the foot of the screen immediately
to the right of Select: . On pressing <ENTER>, the screen appears
as in Figure 5-1.
Fig. 5-1 The Screen for the TEXT Program
FILE NAMES IN TEXT
In response to the prompt:
File to edit?
the user should enter the name of the file to be edited or created and
press <ENTER>. There are certain facts to be borne in mind when choosing
a name for an M10 file. The name may be up to 6 characters in length,
with the following restrictions:
M10 Operations Guide 5-1
- A file name must not begin with a number.
- The following symbols are not accepted as the first character
in a file name:
! " # $ % & ' *
( ) + * : , . /
- In addition, the full stop (.) and the colon (:) are forbidden any-
where in a file name. The only exception to this is when the full
stop occurs right at the end of the name, in which case it is incor-
porated into the suffix (see the example below).
- The M10 converts all letters to upper case, so you can not use capi-
tals as a means of distinguishing between otherwise identical file
names.
Having typed in the selected file name, press <ENTER>. If the file name
is rejected for violation of any of the quoted restrictions, the M10
emits a warning "beep" and the prompt File to edit? is repeated on the
next line. If accepted, the screen is cleared and the cursor appears in
the top left hand corner enclosing a left-pointing arrow to mark the
start of the text.
Files created under TEXT are all suffixed .DO by the computer. There is
no need for the user to do this. If, for example, you enter the file
name RED in response to the prompt, the file will be listed RED.DO in the
main menu. The following example gives some instances of legal and ille-
gal file names.
FILE NAME ENTERED NAME ALLOCATED BY TEXT
FILE FILE.DO
file FILE.DO
fILe FILE.DO
file. FILE.DO
F 1 L E F I L E.DO
#FILE Not Accepted
FILETS FILE#.DO
F1.LE Not Accepted
"FILE" Not Accepted
FILE.DO FILE.DO
5-2
Up to 19 files can be stored in RAM at any one time and they will appear
on the menu in addition to the five applications programs. If you need
more files than this, some will have to be stored on an external device
such as a cassette tape recorder (see Chapter 9).
To delete a file from RAM, access the BASIC program fran the main menu
and give the following command:
KILL "filename" <ENTER>
It is important to remember the double quotation marks round the file
name. It is equally important to type the full file name, including the
suffix.
TYPING INTO A TEXT FILE
Once you have attributed a valid file name, you can begin to type in text
via the keyboard. It appears on the screen as it is typed. As mentioned,
the screen will take up to 40 characters per line. There is no need to
press <ENTER> for a carriage return at the end of each line; the cursor
proceeds automatically from line to line, word-wrapping where necessary.
To correct typing errors, place the cursor one character space to the
right of the letter to be deleted and press the <DEL/BS> key. If
<SHIFT> + <DEL/BS> is pressed, the character over which the cursor is
positioned is deleted. To insert a character, or a block of text, simply
position the cursor in the desired location and type in the insertion.
The subsequent text will move one space to the right for each character
inserted. The M10 operates permanently in 'Insert' mode. To add to the
text already in a file, move the cursor to the end of the current text
and type in the addition.
The position of the cursor is controlled by the cursor movement keys, a
group of four keys labelled with arrows on the top right hand side of the
keyboard, just below the screen. They have already been described in
Chapter 1 but for the sake of convenience the information is repeated
here. Their use is detailed in Figure 5-2.
Like the majority of keys, the cursor movement keys are repetitive when
held down. By holding down the Right Arrow key, the cursor is made to
scan from left to right, moving from the end of one line to the beginning
of the next. When it reaches the bottom of the screen it will continue to
scan, causing the next line to appear. The Left Arrow key executes a
reverse scan, right to left and bottom to top, in exactly the same way.
When held down, the Up Arrow moves up the screen, causing the preceding
text to appear until it reaches the beginning of the file. The Down
Arrow key has an identical action in the oppposite directon until the end
of the file is reached. These keys can be said to have a scrolling func-
tion.
M10 Operations Guide 5-3
KEY
CURSOR MOVEMENT
One space to the right
<SHIFT>
To beginning of next word
<CTRL>
To end of current line
One space to the left
<SHIFT> +
To beginning of last word (or current word)
<CTRL> +
To beginning of current line
One line up
<SHIFT> +
To top line of screen
<CTRL> +
To beginning of file
One line down
<SHIFT> +
To bottom line of screen
<CTRL> +
To end of file
Fig. 5-2 Cursor Movement Keys
FUNCTION AND COMMAND KEYS IN TEXT
As shown in Figure 5-3 below,the keys F1-F8 control special functions in
TEXT mode.
Fig. 5-3 Screen with the Function Keys Labelled
To display these functions on the screen, press <LABEL>. These func-
tions, which offer the user a wide range of word-processing options, are
dealt with in the next few sections. A summary of the function and
5-4
command keys in TEXT is given in Figure 5-6.
FINDING A CHARACTER STRIN6 IN TEXT
The 'Find' function is controlled by the function key F1. In order to
select this option, simply press this key. The screen will then display
the messaqe
String:
at the bottom of the screen with the cursor immediately to the right.
Type in the character string you are looking for and press <ENTER>. Typ-
ically, this would be a word or phrase. The cursor will move to indicate
the start of the string where it first occurs in the text and the string
prompt disappears from the screen. On pressing <F1> again the prompt and
string reappear. Pressing <ENTER> causes the computer to search for
further occurrences of the same character string. If the string entered
is not found in the text, the computer returns the message
No match
There are certain important points to be remembered when using this
option.
1. The character string must be no longer than 24 characters, including
spaces. If you try to exceed this number, the computer gives a warn-
ing "beep" and the cursor will not move any further to the right.
2. Spacing is of vital importance. If the spacing is wrong, the string
will not be found.
3. The search is initiated from the current cursor location. If you
wish to search the whole text for a particular string, make sure the
cursor is at the beginning of the file before selecting <F1>. There
is no way of searching backwards through the file.
4. In this application, as in others, the M10 makes no distinction
between upper and lower case letters and therefore ignores such
differences when matching the target string to the text.
When changing from one string to another, press <F1> and begin typing the
new characters to be searched for. This eliminates the preceding string.
THE 'LOAD' FUNCTION IN TEXT
This function, invoked by pressing <F2>, provides a means of loading
information from a cassette tape recorder into a TEXT file. To do this
carry out the following procedure:
1. Ensure that the M10 is connected to a suitable cassette recorder (see
Chapter 9 for details of this).
2. Access the TEXT file into which the data are to be loaded (if neces-
sary create a new file for this).
M10 Operations Guide 5-5
3. Press <F2>. This brings up the prompt
Load from:
4. In response to this prompt, type the file name and press <ENTER>.
While searching for the specified file the computer emits a high-
pitched sound. When it has been located, the following prompt
appears on the screen:
FOUND: filename
where 'filename' represents the name entered in the previous step.
If there is more than one file on the cassette, each time the M10
encounters another during its search, it will display the message
SKIP: filename
If you specify that the information from the cassette tape is to be
loaded into a file already containing text, the contents of the cassette
file will be appended to the TEXT file you have accessed.
More detailed information on the use of a cassette tape recorder in con-
junction with the M10 appears in Chapter 9.
THE 'SAVE' FUNCTION IN TEXT
When you have created or edited a TEXT file and wish to store the con-
tents in a file on a cassette tape, you must use the 'Save' function
(F3). To do this proceed as follows:
1. Ensure that a suitable cassette recorder is connected to the M10 (see
Chapter 9).
2. Access the file you wish to save and press <F3>. This brings up
the prompt
Save to:
at the bottom of the screen.
3. Select a file name not exceeding six characters for the cassette file
in which the contents of the TEXT file are to be saved.
4. Type in the chosen file name and press <ENTER>.
When the prompt disappears from the screen, the information has been
saved under the chosen file name.
For more detailed information on how to save files to tape, see
Chapter 9.
5-6
THE 'SELECT' FUNCTION
The 'Select' function (F7) is used to define a block of text which is to
be copied ('Copy' - F5), deleted ('Cut' - F6) or moved (Cut and Paste).
Such a block can vary in length from a single character to the entirety
of the text in the file.
You are, however, limited by the amount of memory you have at your dispo-
sal. If the chosen block occupies more memory than indicated on the main
menu under Bytes free you will receive the message
Memory full
Likewise, if you receive this messaqe when you press PASTE, it means that
you have exceeded the RAM capacity. Care should be taken when selecting
long blocks of text.
To define a text block, position the cursor at the beginnina of the text
to be manipulated and press <F7>. The cursor movement keys can then be
used to define the block, either character by character with the right
arrow key or line by line, using the down arrow key. Characters included
in the selected block appear "in negative" on a black background, as
shown in Figure 5-4 below.
Fig. 5-4 A Selected Block of Text
In fact, the text can be defined from the cursor position onwards, or
from the same position backwards through the file. This is summarised in
Figure 5-5.
M10 Operations Guide 5-7
TEXT BLOCK TO BE DEFINED KEY SEQUENCE
Next character to the right <F7> then <Right Arrow>
Next character to the left <F7> then <Left Arrow>
Word following cursor <F7> then <SHIFT> + <Right Arrow>
Word preceding cursor <F7> then <SHIFT> + <Left Arrow>
From the cursor to end of <F7> then <CTRL> + <Right Arrow>
current line
From the cursor to beginning <F7> then <CTRL> + <Left Arrow>
of current line
From cursor to bottom of screen <F7> then <SHIFT> + <Down Arrow>
From cursor to top of screen <F7> then <SHIFT> + <Up Arrow>
All text from cucsor to <F7> then <CTRL> + <Down Arrow>
end of file
All text from cursor to <F7> then <CTRL> + <Up Arrow>
beginning of file
Fig. 5-5 Defining a Text Block
Another method of selecting a block of text involves using the 'Find'
function. This allows you to select text from the current cursor posi-
tion up to a particular word or phrase. To do this, proceed as follows:
1. Press <F7> when you have moved the cursor to the starting point.
2. Now press <F1> and enter the string or word at which the selected
block is to end.
3. Press <ENTER>. All text from the original cursor position up to but
not including the first character in the string is now selected and
appears "in negative" on the screen.
If more text is selected than re<uired, nroving the cursor back to the
chosen end point removes the extra text from the block. To cancel a
'Select' operation, press <BREAK> i.e. <SHIFT> + <PAUSE> and the selected
block will disappear from the screan.
5-8
USE OF THE 'COPY' FUNCTION
The function key F5 offers the possibility of duplicating a block of text
(e.g. a recurring word or phrase) in another part of the file. The two
functions 'Copy' and 'Cut' involve using not only the respective function
keys (F5 and F6) but also the 'Select' function and the PASTE command.
To carry out a 'Copy' operation, proceed as follows:
1. Press <F7> and define the block of text to be copied, as explained in
the preceding section. The selected block appears "in negative" on a
black background.
2. Press <F5>. The dark background disappears, showing that the
selected block has been stored in the PASTE buffer.
3. Move the cursor to the position where the copy is to be inserted and
press <PASTE>.
Note that the insertion will be made in such a way that the last charac-
ter of the copy will occupy the space preceding the cursor position,
unless the last character in the selected block is a carriage return
(when <ENTER> is pressed) in which case it will occupy the preceding
line. If the same text is to be copied in more than one location in the
file, only step 3 need be repeated since the selected text remains in the
PASTE buffer until superseded by another 'Select' operation.
THE 'CUT AND PASTE' FUNCTION
This function is used to delete a block of text or to move it from one
position to another in the file. The function key F6 is used in conjunc-
tion with 'Select' (F7) for simple deletion, and with 'Select' and
<PASTE> in a 'Cut and Paste' operation. The procedure is as follows:
1. Press <F7> and define the text to be deleted as explained previously.
The selected block appears against a dark background.
2. Press <F6>. The selected text is deleted from the file and stored in
the PASTE buffer. If the operation in question is a simple deletion,
it is now complete. The deleted text can be recovered from the PASTE
buffer until superseded by another 'Select' operation.
3. To place the text elsewhere in the file, move the cursor to the new
position and press <PASTE>. The text deleted from one position will
now be inserted in the new location.
NOTE: Both the 'Copy' and 'Cut and Paste' operations can be used to
transfer data from one file to another. The procedure up to the last step
is identical to that described. Tnstead of positioning the cursor for
insertion in the current file, however, access the file to which it is to
be transferred, position the cursor in the appropriate location in that
file and press <PASTE>.
M10 Operations Guide 5-9
PRINTING A TEXT FILE
A TEXT file can be printed using the special command key PRINT. In order
to use this command, of course, the M10 must be connected to a printer by
means of the Olivetti printer cable. The connection is made to the
PRINTER parallel interface on the rear panel.
- Pressing <PRINT> prints what is currently displayed on the screen.
- Pressing <SHIFT + PRINT> prints out the entire TEXT file. This com-
mand brings up the prompt
Width?
and displays the current width setting. 1f you wish to change the
line width of the printed file, type in a value from 10 to 132 and
press <ENTER>. This fixes the number of character spaces in a line of
printed text.
If you press <ENTER> without entering a value for the line width, the
last value entered will be effective. The default line width is 80
character spaces.
'MENU' FUNCTION
The function key F8 is labelled 'Menu' and has two simultaneous func-
tions. Pressing this key closes the file and returns the user to the
main menu. The file will then be stored in RAM under its file name and
the menu displayed on the screen.
SUMMARY OF FUNCTION AND COMMAND KEYS
Figure 5-6 below summarises the use of the various function and command
keys when operating in TEXT mode.
5-10
KEY
FUNCTION
F1 Find
Locates a given character string in the text.
F2 Load
Loads a file from a cassette tape into
the M10.
F3 Save
Saves a file to an external cassette tape
recorder.
F4
Not used in TEXT.
F5 Copy
block of text to another location in the file or to another file.
F6 Cut
Deletes a block of text or, used with PASTE
to effect a 'Cut and Paste' operation.
F7 Select
Defines a block of text for subsequent
manipulation.
F8 Menu
Closes the file and returns the user to the
main menu.
PASTE
Inserts the contents of the PASTE buffer into
the file at the position given by the cursor.
Used in 'Copy' and 'Cut and Paste' operations.
LABEL
Displays labelled functions on the screen.
PRINT
Prints the contents of the screen or the file
on an external printer.
PAUSE/BREAK
Only BREAK is used in TEXT - to cancel a
'Select', 'Find', 'Load' or 'Save' operation.
Fig. 5-6 Function and Command Keys in TEXT
EQUIVALENCE OF CONTROL CHARACTERS
All the function and cursor movement keys have an equivalent control key
sequence. Of course, it is not necessary to know these sequences but it
could be useful and a table of equivalents is given in Figure 5-7.
M10 Operations Guide 5-11
CONTROL KEY
SEQUENCE
<CTRL> +
EQUIVALENT TO
FUNCTION
A
<SHIFT> + <Left Arrow>
Cursor to start of preceding
word
B
<SHIFT> + <Down Arrow>
Cursor to bottom of screen
C
<BREAK>
Cancels 'Select', PRINT,
'Save', 'Load' and 'Find'
D
<Right Arrow>
Cursor one space to right
E
<Up Arrow>
Cursor up one line
F
<SHIFT> + <Right Arrow>
Cursor to start of next word
G
<F3>
'Save' function
H
<DEL/BS>
Deletes preceding character
I
<>
TAB skip
L
<F7>
'Select' function
Fig. 5-7 Control Key Equivalents of Function Keys (cont.)
5-12
CONTROL KEY
SEQUENCE
<CTRL> +
EQUIVALENT TO
FUNCTION
M
<ENTER>
Enter a command or carriage
return
N
<F1>
'Find' function
Q
<CTRL> + <Left Arrow>
Cursor to start of current
line
R
<CTRL> + <Right Arrow>
Cursor to end of current line
S
<Left Arrow >
Cursor one space to left
T
<SHIFT> + <Up Arrow>
Cursor to top of screen
U
<F6>
'Cut' function
V
<F2>
'Load' function
W
<CTRL> + <Up Arrow>
Cursor to beginning of file
X
<Down Arrow>
Cursor down one line
Y
<PRINT>
Print operation
Z
<CTRL> + <Down Arrow>
Cursor to end of file
Fig. 5-7 Control Key Equivalents of Function Keys
M10 Operations Guide 5-13