home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
enterprs
/
cpm
/
utils
/
f
/
pwinstl.arc
/
LESSON6.MSS
< prev
next >
Wrap
Text File
|
1993-03-27
|
7KB
|
203 lines
Lesson 6
SEARCHING
When revising a document, you will frequently need to find
and change specific words and phrases. It would be tedious to
scroll from screen to screen searching for the items you want to
change.
In this lesson, we will examine several commands for
searching and changing words and phrases, and finding specific
lines.
As in previous lessons, you will be working with two windows.
The top window will display a practice document and the bottom
window will hold these instructions.
At this time create two windows:
Escape...Operation...Windows...2 windows
From this point on, follow the instructions in the bottom
window by selecting:
Escape...Forward...Other window
Next, display in the top window the practice document for
this lesson. Select:
Escape...Documents...Read
When Perfect Writer responds "Document to Read:," type:
"wonder" (followed by the Return key).
Let us search forward in this document from the position of
the cursor to the first occurrence of a particular word. Select:
Escape...Search...Forward
Perfect Writer responds: "Search forward for:"
Type "John," (no quotes) followed by the Return key.
Perfect Writer searches forward for the first occurrence of
"John," positioning the cursor at the name "John_ N. Williams."
Is there another "John" in this document? To find out,
repeat the command: Escape...Search...Forward...<Return> (You
don't need to retype "John." Perfect Writer will continue to
search for the last named item.)
It is important to understand that Perfect Writer searches
not for words, but for strings of characters. If it cannot
find the exact character string you have specified, it will
report "Not Found."
Perfect Writer searches differently depending upon whether
you specify your item using UPPER or lowercase letters.
Uppercase letters will find and match ONLY uppercase letters,
while lowercase letters will find and match BOTH upper and
lowercase letters. That is:
"john" will find and match "john," "John," and "JOHN."
"JOHN" will find and match only "JOHN."
Now try a Backward search, which works exactly like the
Forward search except that Perfect Writer searches backward
from the position of the cursor.
Move the cursor to the end of the document, using
"Escape...Forward...End," and select:
Escape...Search...Backward
When Perfect Writer displays "Search backward for:", ask to
see the first occurrence of "Remington." How many times does
this word occur in the document? (This time, use ESCAPE...REPEAT
to reissue the command.)
Although the Forward and Backward Search commands represent
an easy and efficient means of locating an item in even the
longest document, they do not provide a means of changing the
item once it is found.
Perfect Writer provides two replacement commands. The first
replaces every occurrence of a word or words throughout your
document. The second pauses to ask if you really want to make the
change. The second command provides the following options:
Yes Replaces the item and goes to the next.
No Skips the item and goes to the next.
Cancel Cancels the search and replace operation.
Every one Replaces all remaining occurrences of the
item without asking for further confirmation.
Show me Replaces the old item with the new and
asks if you are satisfied with the result.
Let us replace every occurrence of the word "typewriter" in
the practice document with the words "writing machine." Using
"Escape...Backward...Home," move the cursor to the beginning of
the document and select:
Escape...Search...Replace...Every one
Perfect Writer responds with the message: "Replace:". Type
the word "typewriter," followed by the Return key. Perfect
Writer then asks: "With:". Enter "writing machine," followed by
the Return key to begin the search and replace operation.
The process takes a few moments. When finished, Perfect
Writer redisplays the document showing the changes you requested.
Have they all been made? Using the Search Forward command,
search through the document for every occurrence of "writing
machine." Was the change appropriate in every case?
Notice that even though you did not specify it, plural
forms of "typewriter" were also replaced.
Suppose now that you wish to change only selected
occurrences of an item. Perfect Writer provides the
"Search...Replace...Ask me" command, which allows you to decide
upon each change that is made.
Let's change selected occurrences of "writing machine" back
to "typewriter." Using "Escape...Backward...Home," move to the
beginning of the document and select:
Escape...Search...Replace...Ask me
The cursor will stop at each replacement and display the Replace
menu. For at least one, select "Show me." (If you get stuck
anywhere, just cancel the operation and start over).
SEARCHING BY LINE NUMBER
Perfect Writer allows you to search a document by line
number. The "Search...Line number" option will move the cursor
from any place in the document to the line number you specify.
Try it now. Select:
Escape...Search...Line number
Perfect Writer will respond: "Line number:." Type "53"
followed by the Return key. Perfect Writer should move the
cursor to the paragraph beginning "The early 1980's. . . ."
The Line Number command is convenient when you make an
error using one of Perfect Writer's Document Design Commands (we
discuss these in Lesson 9). When checking a document prior to
printing, Perfect Writer will identify document design errors by
line number. For example:
"Error occurred on line 296"
When this happens, you must re-enter your document and
correct the error before continuing to print the document.
Rather than counting line numbers to find the error, use the
"Search...Line number" command.
This concludes our lesson on searching. If you wish to
continue on to Lesson 7, which discusses "Handling Multiple
Documents," select:
Escape...Documents...Read
When Perfect Writer asks "Document to read," type "lesson7,"
followed by the Return key. Perfect Writer will read Lesson 7
into memory and switch you to it.
If you do not wish to continue, select:
Escape...Exit PW
IMPORTANT: Perfect Writer will respond with the message:
"Document(s) not saved! Do you still wish to exit?" Answer `y'
for Yes, since you do not want to save any changes made during
the lesson.
Perfect Writer will return you to the PSI Menu, from where
you can return to the operating system.
End of Lesson 6