[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

NAMEGAME, ALLWORDS



  Here's a program I've been working on for the last month or so. It's been
through a number of changes, some suggested by David Becker. I also learned a
lot since I started it about reading the command line, following the examples
in Robert Holmgren's CTRLCHAR.TXT.
  NAMEGAME allows the user to search and replace whole words or phrases. A
similar program, ALLWORDS, counts whole words or phrases.
  Be careful to capitalize words and phrases as they would appear in the
middle of a sentence, i.e., capitalizing proper nouns, and the program will
match case properly in almost all other regular occurrences: at the start of a
sentence, in a title in which all words are capitalized, and in all-caps text.
The substitute entered becomes the default. The program will replace all
instances of the target, but some touching up of capitalization may be
necessary in exceptional cases (the routines cannot guess how a phrase would be
capitalized if it appears both in normal text and in a title in which articles
and conjunctions are not capitalized). And of course it will not find strings
that have typographical interruptions, such as a mode command or a
carriage-return, unless the target was entered with those characters added.
  The programs prompt the user to enter target strings and substitutes on the
CM line, and nearly any character can be entered. Cursor keys, Del and BkSp
edit entries. The accent functions, S1 to S7 are permitted, for those who use
XyWrite for foreign language work.
  Both programs have versions for Nota Bene, required by differences in NB's
keyboard that add extra functions to keys I otherwise find natural for text
entry.
  Finally, this will all work with early versions of XyWrite III Plus, because
the routines do not rely on the XS function. I've just never got around to
updating my copy of XyWrite, and I do think I'd like to take advange of some of
the improvements. But in this case, being a slug makes my output portable for
the large number who are as backwards as I am.
  Comments invited. -- Jim Franklin