Carolyn's Corner - May, 1991

Q--> Will you please review the "Search and Replace" feature of AtariWriter Plus? What is it good for anyway?

A--> I personally use this feature quite often. For instance, in writing this column, instead of writing out "AtariWriter Plus" in full each time I use the name, I could just type "ATW." Then when I'm finished with the article, I could use Search and Replace to change it to the full name. Here's how it's done:

First go to the top of the document by pressing [SELECT-T]. Then press [START-S], and when prompted for the search string [of characters], enter "ATW" (without the quotation marks, of course). Next, press [START-R], and enter "AtariWriter Plus" as the replace string. Now if you press [OPTION-G], all occurrences of "ATW" will be instantly changed to "AtariWriter Plus."

In the case of this particular column, it wouldn't really be a good idea to do a Global Replace, as there are several occurrences of "ATW" that shouldn't be changed. So, instead of pressing [OPTION-G], search selectively by pressing [SELECT-S]. This will find the first occurrence of "ATW." If you want to replace it, press [SELECT-R]. If not, press [SELECT-S] again and the program will take you to the next occurrence of "ATW." Anytime you want to replace the "ATW" string with "AtariWriter Plus," press [SELECT-R].

If you are using the 130XE version, and have a lengthy document that takes up more than one bank, just go to the next bank by pressing [START-B], make sure you are at the top of the new bank by pressing [SELECT-T], and continue as above, either globally or selectively.

You'll find there is no need to keep answering prompts about whether or not you want to replace, as is required with a great many other word processors. In fact, you can actually stop searching, type some more text, then resume searching by pressing [SELECT-S] whenever desired. Of course, if you want to search for a different string, you must enter the new string by pressing [START-S].

There are many other instances when the Search and Replace function saves the day. Here are some of them:

Imagine you have written a short story about Josephine. When you are finished, you begin to wish you had named your heroine Jennifer instead. No problem! Just use the Global Search and Replace. It's amazing how fast all the changes will be made!

Now suppose you are typing a movie script. You have some paragraphs with dialog and some with scene description. According to the rules, the scene descriptions are written with normal margins, but the dialog paragraphs are indented at both left and right margins.

It is quite tedious to actually keep changing the margins back and forth throughout your script. However, if you precede each scene-description paragraph with "SSS," you can globally replace it with the control codes for left and right margins of 10 and 70 or whatever you need. Similarly, you can precede each dialog paragraph with "DDD" and globally replace it with the required margins for dialog.

Those of you who are programmers might think of this procedure as using variables and then changing them to constants. Of course, if you later decide that the 10 and 70 should have been 5 and 75, it's very easy to change one "constant" to another.

The original AtariWriter cartridge program did not allow the use of control codes in either the search string or the replace string. This is just one of the many improvements that justify the "Plus" label. About the only thing that you can't search for is the question mark. That is used as a single-character wildcard. For instance, searching for "f?n" in this article will locate "find", "define", "function", and the "f n" from "If not" among others.

Sometimes it is convenient to mark a particular place in your document so that you can quickly find it again. AtariWriter Plus doesn't allow you to enter a "marker" as such, but you can simulate this feature by typing "+++" or anything else that wouldn't normally appear in your document. Then when you want to get back to the marked passage, just use [START-S] to define it and [SELECT-S] to find it.

Remember to delete this pseudo marker before printing your document, or you will also find it on your printed page. If you have several identical markers, you can delete them all automatically by starting at the top, defining the marker as the search string and just pressing [RETURN] for the replace string. Then when you press [OPTION-G], the markers will all be replaced with nothing, or in other words - deleted!

There are a few things to remember about searching and replacing in general:

1) Normally, the search is done from the cursor downward to the end of the document (or bank), but it is possible to search upward by pressing [SELECT-U] instead of [SELECT-S].

2) When you enter the search string, it doesn't matter whether you enter uppercase, lowercase, or a mixture of the two. The program will find any occurrence of whatever letters you enter in either case. However, when you enter the replace string, be sure to type it exactly as you want it to appear.

3) You must be extremely careful when replacing globally. For instance, if you decide you want to change "ball" to "balloon," and use [OPTION-G] to make all the changes automatically, you might be in for some surprises. For instance, if you have used the word "globally," you will now have "globalloony." The program found "ball" just as you asked it to, the fact that it was part of another word notwithstanding.

You could get around this problem by searching for " ball " with a space before and after the word. In that case, the replace string must also have spaces: " balloon " for instance. Remember, you do not type the quotation marks, but the spaces are essential.

This is still not foolproof, because if the word "ball" is followed by a comma, period, or any other punctuation mark, it will not be found. But then, you DO thoroughly proofread everything you write, don't you? Or, better yet, have someone else proofread it for you?

Return to Articles index