home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / f / pwinstl.arc / LESSON6.MSS < prev    next >
Text File  |  1993-03-27  |  7KB  |  203 lines

  1.  
  2.  
  3.                        Lesson 6
  4.  
  5.                        SEARCHING
  6.  
  7.  
  8.     
  9.     When revising a document, you will frequently need to find
  10. and change specific words and phrases.  It would be tedious to
  11. scroll from screen to screen searching for the items you want to
  12. change.  
  13.  
  14.     In this lesson, we will examine several commands for
  15. searching and changing words and phrases, and finding specific
  16. lines.
  17.  
  18.     As in previous lessons, you will be working with two windows.
  19. The top window will display a practice document and the bottom
  20. window will hold these instructions.
  21.  
  22.  
  23.  
  24.     At this time create two windows:
  25.  
  26.             Escape...Operation...Windows...2 windows
  27.  
  28.  
  29.     From this point on, follow the instructions in the bottom
  30. window by selecting: 
  31.  
  32.  
  33.                  Escape...Forward...Other window
  34.  
  35.  
  36.  
  37.      Next, display in the top window the practice document for
  38. this lesson.  Select:
  39.  
  40.  
  41.                    Escape...Documents...Read 
  42.  
  43.     When Perfect Writer responds "Document to Read:," type:
  44.  
  45.             "wonder"  (followed by the Return key). 
  46.  
  47.     Let us search forward in this document from the position of
  48. the cursor to the first occurrence of a particular word.  Select:
  49.  
  50.                     Escape...Search...Forward
  51.  
  52.      Perfect Writer responds:  "Search forward for:"
  53.  
  54.      Type "John," (no quotes) followed by the Return key.
  55.  
  56.      Perfect Writer searches forward for the first occurrence of
  57. "John," positioning the cursor at the name "John_ N. Williams." 
  58.  
  59.     Is there another "John" in this document?  To find out,
  60. repeat the command: Escape...Search...Forward...<Return> (You
  61. don't need to retype "John." Perfect Writer will continue to
  62. search for the last named item.)
  63.  
  64.     It is important to understand that Perfect Writer searches
  65. not for words, but for strings of characters.  If it cannot
  66. find the exact character string you have specified, it will
  67. report "Not Found."
  68.  
  69.      Perfect Writer searches differently depending upon whether
  70. you specify your item using UPPER or lowercase letters.
  71. Uppercase letters will find and match ONLY uppercase letters,
  72. while lowercase letters will find and match BOTH upper and
  73. lowercase letters.  That is:
  74.  
  75.      "john" will find and match "john," "John," and "JOHN."
  76.      "JOHN"   will find and match only  "JOHN."
  77.  
  78.  
  79.      Now try a Backward search, which works  exactly like the
  80. Forward search except that Perfect Writer searches backward
  81. from the position of the cursor.  
  82.  
  83.     Move the cursor to the end of the document, using
  84. "Escape...Forward...End," and select:
  85.  
  86.  
  87.                    Escape...Search...Backward
  88.     
  89.     When Perfect Writer displays "Search backward for:", ask to
  90. see the first occurrence of "Remington."  How many times does
  91. this word occur in the document? (This time, use ESCAPE...REPEAT
  92. to reissue the command.)
  93.  
  94.     Although the Forward and Backward Search commands represent
  95. an easy and efficient means of locating an item in even the
  96. longest document, they do not provide a means of changing the
  97. item once it is found.  
  98.  
  99.     Perfect Writer provides two replacement commands. The first
  100. replaces every occurrence of a word or words throughout your
  101. document. The second pauses to ask if you really want to make the
  102. change.  The second command provides the following options:
  103.     
  104.         Yes          Replaces the item and goes to the next.
  105.  
  106.         No          Skips the item and goes to the next.
  107.  
  108.         Cancel      Cancels the search and replace operation.
  109.  
  110.         Every one      Replaces all remaining occurrences of the
  111.                       item without asking for further confirmation.
  112.  
  113.         Show me      Replaces the old item with the new and 
  114.                   asks if you are satisfied with the result.
  115.  
  116.  
  117.     Let us replace every occurrence of the word "typewriter" in
  118. the practice document with the words "writing machine." Using
  119. "Escape...Backward...Home," move the cursor to the beginning of
  120. the document and select: 
  121.  
  122.               Escape...Search...Replace...Every one
  123.  
  124.     Perfect Writer responds with the message: "Replace:".  Type
  125. the word "typewriter," followed by the Return key.  Perfect
  126. Writer then asks: "With:". Enter "writing machine," followed by
  127. the Return key to begin the search and replace operation.  
  128.  
  129.     The process takes a few moments.  When finished, Perfect
  130. Writer redisplays the document showing the changes you requested.
  131. Have they all been made?  Using the Search Forward command,
  132. search through the document for every occurrence of "writing
  133. machine." Was the change appropriate in every case?
  134.  
  135.     Notice that even though you did not specify it, plural
  136. forms of  "typewriter" were also replaced.
  137.  
  138.       Suppose now that you wish to change only selected
  139. occurrences of an item.  Perfect Writer provides the
  140. "Search...Replace...Ask me" command, which allows you to decide
  141. upon each change that is made.
  142.  
  143.     Let's change selected occurrences of "writing machine" back
  144. to "typewriter." Using "Escape...Backward...Home," move to the
  145. beginning of the document and select:
  146.  
  147.                Escape...Search...Replace...Ask me
  148.  
  149. The cursor will stop at each replacement and display the Replace
  150. menu.  For at least one, select "Show me." (If you get stuck
  151. anywhere, just cancel the operation and start over). 
  152.  
  153.  
  154.                     SEARCHING BY LINE NUMBER
  155.  
  156.     Perfect Writer allows you to search a document by line
  157. number.  The "Search...Line number" option will move the cursor
  158. from any place in the document to the line number you specify.
  159. Try it now. Select:
  160.  
  161.                   Escape...Search...Line number
  162.  
  163.     Perfect Writer will respond: "Line number:."  Type "53"
  164. followed by the Return key.  Perfect Writer should move the
  165. cursor to the paragraph beginning "The early 1980's. . . ."
  166.  
  167.      The Line Number command is convenient when you make an
  168. error using one of Perfect Writer's Document Design Commands (we
  169. discuss these in Lesson 9).  When checking a document prior to
  170. printing, Perfect Writer will identify document design errors by
  171. line number.  For example:
  172.  
  173.                   "Error occurred on line 296"
  174.  
  175.     When this happens, you must re-enter your document and
  176. correct the error before continuing to print the document.
  177. Rather than counting line numbers to find the error, use the
  178. "Search...Line number" command.
  179.  
  180.  
  181.     This concludes our lesson on searching. If you wish to
  182. continue on to Lesson 7, which discusses "Handling Multiple
  183. Documents," select:
  184.  
  185.                     Escape...Documents...Read
  186.  
  187.      When Perfect Writer asks "Document to read," type "lesson7,"
  188. followed by the Return key.  Perfect Writer will read Lesson 7
  189. into memory and switch you to it.
  190.  
  191.     If you do not wish to continue, select:
  192.  
  193.                         Escape...Exit PW
  194.  
  195.     IMPORTANT: Perfect Writer will respond with the message:
  196. "Document(s) not saved!  Do you still wish to exit?"  Answer `y'
  197. for Yes, since you do not want to save any changes made during
  198. the lesson.
  199.  
  200.     Perfect Writer will return you to the PSI Menu, from where
  201. you can return to the operating system.
  202.  
  203.                          End of Lesson 6