

 
                              -14-

            VIII   STRING SEARCH AND REPLACE

     Both the search and replace commands perform a fast search
for a specified string in the selected file buffer.  The replace
command will then optionally perform a replacement of the search
string with a new string.

     Alt F invokes the search function only.  A question is
displayed on the command line to be answered whether the buffer
should be searched from its beginning (the entire buffer search)
or just from the current location of the cursor to the end of
the buffer.  WORDFLEX uses a standard type of question that
expects an affirmative answer (y or Y) or a negative answer (n
or N).  You will notice that all other characters are ignored.
The command will not be executed till one of these responses is
entered.  Both the search and replace commands then request the
search string.  The search string can be up to 70 characters
long.  A longer string will be truncated upon entry to 70
characters.

     If the string is found, the line with the string is
displayed on top of the screen of the text that follows.  The
search can then continue for the next occurrence of the string
or it can be cancelled.  If the string is not found, a
corresponding message appears on the command line.  Nothing
happens to the display or to the location of the cursor. Option
"d" of the Alt A command selects replacement with confirmation
(option TRUE, the default) or without (FALSE). An automatic
creation of a new line takes place if the new string is too long
to fit on the same line as the string it replaces.


     Summary:

      Alt F    -    searches buffer for a specified string and
                    displays the line that contains it and a
                    screen of text that follows

      Alt R    -    searches buffer for a specified string,
                    replaces it with or without confirmation,
                    displays the result

     Alt A command option setting:

     "d": replace prompt is either TRUE or FALSE for replacement
          with confirmation/rejection or no confirmation,
          respectively.




 
                              -15-

             IX   LINES AND BLOCKS OF TEXT

     WORDFLEX allows the user to mark two or more lines of text
as a block and to handle them as units.  Only one block can be
marked at a time even if all five file buffers are active.  The
reason for this is that block transfers between separate buffers
are possible; it is the only situation when there is any
interaction between otherwise totally separate file buffers.

     The following special function keys are used for block
marking and inspection:

      F5       -    moves cursor to a mark

      F7       -    marks or unmarks a line; if a line is
                    marked, F7 will unmark it and vice versa

      F8       -    erases both marks

     Only two marks are available in WORDFLEX.  They are
distinct: mark 1 has to precede mark 2 in the buffer and both
marks have to be in the same buffer.  WORDFLEX enforces these
rules; there is no way to mark a block of text improperly.
Marked lines are generally displayed in reversed video.  In this
version, however, WORDFLEX does not display marked empty lines
in reversed video in all cases.  The F5 command, nevertheless,
will always move the cursor to the specified marker, whether the
line has a special display attribute or not.

     Block transfers (copy or move) can be performed within one
file buffer or between two file buffers.  A warning is issued
in the latter case.  In both cases, the moved text is inserted
after the current line which is the line with the cursor.  If
the current line is the last line of a file buffer, the block of
text is appended to the file buffer.  The following Alt commands
are used for block manipulation:

      Alt C    -    copies block from its original site-the
                    marked block remains unchanged


      Alt E    -    erases block  irretrievably


      Alt M    -    moves block from its original site-the
                    marked block is removed from its original
                    site



 
                              -16-



WORDFLEX does not allow transfer of a block to a location
within the block itself or moving a block to a location
immediately following the second mark.  Warning is issued if
such an attempt is made and the command is not executed.

     Block copy or move commands are useful for a quick
rearrangement of text within a file or for the pasting together
of blocks of text from various files.  They can also be used for
merging of files; the merge operation (concatenation of files),
however, can be also performed by the DOS "copy" command
(IBM PC DOS Version 1.1 or 2.0).  As it will be shown in Section
X, marked blocks are also useful for the printing of a portion
of a file buffer.

     WORDFLEX has only one command that operates on a single
line: the line delete command.  As stated before, the Del key
will not remove a line from the buffer, it can only empty it.

      Alt D    -    deletes (irretrievably) the current line
 
     In this version, WORDFLEX does not reclaim memory space
occupied by lines that were deleted by the Alt D, Alt E or an
additional command which will be described later, the Alt K
command.  The status display (Alt S command) keeps track of the
number of lines deleted as well as of the memory space available
to the text buffer.  If large deletions take place, it may
become necessary to save the buffer(s) on diskette files and to
reinitialize WORDFLEX using the Alt Z command.

     The move block command (Alt M) does not generate any wasted
memory space since, in a sense, the text is actually moved to
its new location.  Alt M is thus more economical than the copy
block command (Alt C).  The latter command generates an actual
replica of the text being copied.  This may be necessary in some
circumstances but it is usually not needed when the block
commands are used for the pasting of text from individual files
(file buffers).


 
                              -17-

                   X   PRINTED OUTPUT

     WORDFLEX printing routines are a part of the memory
resident software.  The advantage of this implementation is that
files do not have to be stored before printing; in fact, only
the contents of a selected buffer can be printed.  As mentioned
earlier, stored files can be also printed in their entirety upon
exiting from WORDFLEX and using the DOS "type" command.  The
printing routines allow the user to accomplish more than just
obtaining a printout of a file.  The following options are
available:

      right justification for lines stored without it

      printing of marked blocks of text

      underline and/or boldface (double strike)

      serial or parallel printer

      left margin size

      single or double space

      continuous or single page printing

     The printing routines are invoked by Alt O ("O" as in
output) command.  A request for selection of the right
justification option of the printed text is displayed first.
Selection of this option has no effect on the format of the text
in the buffer; only lines transmitted to the printer are padded
with blanks to achieve the appearance of a right justified text.
This is different from the Alt B command (see Chapter XI) which
performs paragraph reformatting in the text buffer itself.

     Three options are then made available to the user:

      a   -    prints the entire current buffer text

      m   -    prints a marked block of text only

      q   -    quits printing routines (exits)

     In some situations a continuous printing of text is not
practical: fanfold (continuous) forms may not be always
available especially when stationery with a company letterhead
has to be used.  Option "m" of the Alt A command controls the
printing mode.  This option is set FALSE by default, i.e.
continuous printing will normally take place.  When the option
is set TRUE, a page will be printed and ejected.  The printing
will then stop to allow insertion of another blank sheet.  Next
page will be printed by entering "c" for continue after the
prompt on the command line.


                              -18-


     As mentioned in the summary of printing options available
in WORDFLEX, part of the text can be underlined or printed with
double strike, thus creating a boldface appearance. In order to
get this type of printout, the parts of the text to be
underlined, printed boldface or both have to be delimited by two
Ctrl characters:

      Ctrl P   -    start of underline or boldface
      Ctrl Q   -    end of underline or boldface

These two characters are displayed on the IBM PC screen as
a left and right triangle, respectively.

     The line containing words to be underlined and/or
printed with a double strike has to be terminated in the buffer
with Ctrl U for underline or Ctrl B for boldface.  A line ending
with both these characters will be printed with delimited
portions both underlined and printed with double strike.

     The control characters are used by WORDFLEX internally and
they are removed from the line before the line is transmitted to
the printer.  This has an effect on alignment of columns: since
the control characters are not printed, blanks have to be
inserted in order to maintain column alignment if underline
and/or boldface printing of column headers is selected.

     The rest of the options listed above are selected by the
Alt A command.


 
                              -19-

    Summary:

      Alt O    -    invokes printed routines

                    options and subcommands available:

                         right justification of printed lines
                         printing of entire text
                         printing of a marked block

      Ctrl Q, Ctrl P     -    delimits parts of line to be
                              underlined and/or bold face

      Ctrl U, Ctrl B     -    last characters of lines to be
                              underlined or bold face

     Relevant options selected by Alt A:

           "i": serial printer ('com1')

           "i": parallel printer ('lpt1') - default option

           "l": left margin (0 - 80 columns)  - default value 0

           "k": double spaced printing - default value single
                spaced

           "m": continuous or single page printing
 
                              -20-


               XI   REFORMATTING THE TEXT


     Two WORDFLEX commands act on paragraphs of texts.  As
mentioned above, a paragraph is defined as one or more lines
delimited by empty lines.

     The commands are:

      Alt B    -    right justifies lines to a specified length

      Alt G    -    reformats paragraph

     These commands are executed in many cases automatically if
the corresponding option is selected by Alt A.  By default,
WORDFLEX performs the automatic reformatting of a paragraph
during text insertion when an overflow into the next line takes
place.  This option can be turned off whenever it is not
desirable, as explained in Section VII.  On the other hand,
deletion of individual characters is never followed by an
automatic readjustment of line lengths.  In that case, the Alt G
command has to be invoked if such readjustment is desired.

     Both Alt B and Alt G operate on displayed text only.  In
other words, in order to right justify or reformat an entire
paragraph, you will have to use either Pg Dn or scrolling to
display it completely.  If that is not possible, you have to
finalize the screen pressing F6 (or F9) display the rest of the
paragraph and try again.

     The Alt G command can be used to reformat the lines into
longer ones.  The new line length must first be entered using
the Alt A or Alt W command.  Alt G must be then applied to all
paragraphs where a line lengthening is desired.  In this
version, WORDFLEX does not allow reformatting into shorter
lines.

     The automatic right justification option is off by default.
It is much more convenient to generate text files with variable
line lengths (they also occupy less disk space) than to perform
right justification upon text entry or insertion. The right
justification option of the Alt O command is in most cases
preferable to the actual padding of each line in the buffer with
blanks to maintain a constant line length.

     Nevertheless, the Alt B command is available for the
testing of the appearance of the text when right justified.  The
right justification is performed initially only in the display
(cyan color or high intensity) and it can be reversed as all
similar commands by pressing F9.  F6 will make the right
justification permanent in the buffer; files can be stored with
lines of the same length.


 
                              -21-



     The procedure performing the right justification of lines
was written in such a way that it attempts to pad only about 20%
of a line with blanks.  This means that short lines are not
right justified; this is mandatory for the last lines of
paragraphs. In addition, the right justification is disabled for
all lines that start right of the first tab position. This
approach reasonably solves the problems of right justification
of text lines.

     With the default line length of 64 characters, lines with
less then 52 characters will not be right justified.  It is
suggested to use an old fashioned division of words in such a
case to make right justification possible.  There is no need to
count the number of characters in line: invoking the Alt B
function will display the column right justified according to
the rules just explained.  There are always ways to modify the
text to achieve the most desirable appearance.



 
                              -22-


              XII   REMAINING Alt COMMANDS

     There are three remaining Alt commands:

      Alt J    -    inserts page headers into the buffer
      Alt K    -    kills, i.e. erases individual text buffer
      Alt P    -    inserts a single page header
      Alt Q    -    erases page headers from the buffer
      Alt X    -    exits from Alt H or Alt S display
      Alt Z    -    erases text in all buffers and reinitializes
                    WORDFLEX.

     Alt P inserts a page header just before the current line.

     Page headers can be placed either on the top or on the
bottom of a page.  Option "e" of the Alt A command selects top
page headers (option is TRUE, the default) or bottom page
headers (option is FALSE).

     The exact format of the headers is as follows:


     Top page headers; option "e" is TRUE:

     Ctrl L (ASCII 12, the formfeed character) followed by
     Ctrl H (backspace) and a space

     page number preceded and followed by a hyphen

     0 to 2 optional page title lines

     an empty line

     Bottom page headers;option "e" is FALSE:

     an empty line

     page number preceded and followed by a hyphen

     0 to 2 optional title lines

     Ctrl L (formfeed) character followed by backspace and space

     The default number of page title lines is 0 (i.e., no title
lines except the one with page number).  This number can be
modified by the Alt A command.  By invoking option "f" of the
command, you are prompted first for the number of title lines
and then for their text.  Care should be taken not to make the
title lines longer than the set maximum line length; only the
maximum number of characters selected or set to 64 by default
will be displayed.  Page numbers are incremented automatically
and can be reset by option "h" of the Alt A command.


                              -23-

     Alt Q deletes all page headers, i.e. the formfeed
character, the page number and the lines of optional page titles
from the text buffer.  This command is necessary when
insertions, deletions or block text movement took place in a
document already containing page headers.  Such text
modifications may severely alter the sizes of text pages,
possibly even putting page numbers in an incorrect sequence. The
Alt Q command works as follows:

      Page headers following the current cursor location are
      deleted.

      The deletion stops either at a marked line (if such a line
      exists in the following text) or at the end of the text
      buffer.  A line marked in the text preceding the current
      cursor location has no effect on page header deletion.


     Alt J command inserts page headers into the rest of the
text buffer following the current location of the cursor.  The
insertion stops, as in the Alt Q command, either at a marked
line (if such a line exists in the rest of the text) or at the
end of the text.

     Option "n" of the Alt A command selects the number of lines
per page. including the lines used by the page header.  By
default, the number of lines per page has been set to including
the lines used by the selected page header. 50 but it can be
reset to any value between 3 and 80.

     The Alt J command executes the Alt Q command (deletion of
old page headers) first.  A care should be taken in invoking the
command if the Alt A options "e" (page headers on the top or the
bottom of a text page) or "f" (number and contents of page title
lines) have been changed.  The Alt J command will not perform
properly if these options differ from the current format of the
page headers.  If the page header format is to be changed, the
Alt J command has to be preceded by the Alt Q command with the
"e" option set according to the current page header format.
Once the old page headers have been removed, the page header
format can be changed and the Alt J command executed.  Execution
of Alt Q command in a buffer that does not contain page headers
(more accurately, lines containing the Ctrl L (formfeed
character) has no effect on the text buffer.

 
                              -24-

     The Alt X command is used only when the help (Alt H) or
status (Alt S) display is in effect.  There is no other way to
exit from these displays and to return to the text editing. Care
should be taken not to use Ctrl Break or Ctrl C during these
displays.  Either of them will abort the word processing session
immediately after Alt X has been pressed.

     The Alt Z command is useful when an editing of a document
has been completed and all pertinent text stored on file(s).
Alt Z reinitializes WORDFLEX: all text buffers are erased, the
buffer number is set to 1 and the names of all previously edited
files is also lost.  Some of the parameters changeable by the
Alt A command are reset to their default values.  Alt Z command
releases all memory previously used by the file buffers.

     The Alt K command is probably of a limited use: it allows
the user to erase completely the contents of an individual file
buffer.  As mentioned above, it does not release the memory used
by the buffer; the only useful application would be if all
remaining four buffers have to be preserved (for text merges or
similar situations) and a new text has to be entered instead of
the old one.  The Alt K (as well as Alt D and Alt E) command is
irreversible; the contents of an erased buffer cannot be
retrieved.

 
                              -25-

          XIII PERMANENT MODIFICATION OF DEFAULTS.

     WORDFLEX requires presence of file config.www on the same
diskette and in the same directory (DOS Version 2.0).  This file
contains default values of most of the options selectable by the
Alt A command.  You may prefer another set of default values for
various types of word processing. A special program is
provided on the distribution diskette to allow you to modify the
default values permanently; the Alt A command does it only for
the current session.

     The program is invoked by typing "defaults" from the
operating system.  User with the Color/Graphics Adapter card
will be prompted for answer whether they use color or monochrome
monitor.  Display on a monochrome monitor connected to the
Color/Graphics Adapter card will not be legible if the selection
is made for color.

     Program "defaults" senses selection of either the
monochrome or color card, if you have both and creates a new
file config.www corresponding to your current selection.It will
not allow you to create file config.www for the IBM Monochrome
Display if you have both IBM Monochrome and Color/Graphics cards
and the color is selected.  WORDFLEX reads file config.www
automatically and sets its defaults accordingly.

     Under DOS Version 2.0 you may include different files
config.www in separate directories.  This makes tailoring of the
defaults to the requirements of various types of documents very
easy.

     Under Version 1.1 you can still have different
configuration files but they must reside on different diskettes
since multiple use of file names is not possible in Version 1.1

                              -26-


                   REFERENCE SECTION



     Command   Page    Brief description

      F1        3      displays slowly all screens of the
                       current file buffer

      F2        3      selects one of the active file buffers

      F3        3      loads file of selected name on the next
                       file buffer.  If file does not exist, the
                       file buffer is associated with the
                       specified new file name

      F4        3      stores current buffer on disk file of the
                       name associated with the buffer.  Any
                       other suitable name can also be used

      F5       15      moves cursor to the selected mark
                       (1 or 2)

      F6       11      finalizes text changes displayed on the
                       screen (transfers them into current file
                       buffer)

      F7       15      if line is not marked, marks it.  Mark 1
                       is stored if no marks exist.  If mark 1
                       exists, mark 2 is stored. If line is
                       marked, a mark is erased.

      F8       15      erases mark(s)

      F9       11      restores previous screen display if F6
                       has not yet been pressed.

      F10       3      terminates WORDFLEX session
 
                              -27-


     Command   Page    Brief description

      Alt A     4      displays and/or modifies the list of
                       WORDFLEX options

      Alt B    20      right justifies lines of the rest of
                       paragraph

      Alt C    15      inserts marked block of text after the
                       current line; original block remains
                       unchanged

      Alt D    16      deletes (irretrievably) the current line

      Alt E    15      erases (irretrievably) a marked block of
                       text

      Alt F    14      finds a specified string in the current
                       file buffer

      Alt G    20      readjusts lines to their maximum length
                       in the rest of paragraph

      Alt H     4      displays summary of WORDFLEX commands

      Alt I     6      moves cursor to the left margin column

      Alt J    23      inserts page headers into the text
                       following the cursor location

      Alt K    24      kills (erases) irretrievably file buffer

      Alt L     8      sets left margin at the current cursor
                       position

      Alt M    15      inserts marked block of text after
                       current line; the original block is
                       erased

      Alt O    17      displays menu of options for printed
                       output and prints text using either
                       parallel or serial printer port

 
                              -28-


     Command   Page    Brief description


      Alt P    22      inserts a page header before the current
                       line

      Alt Q    23      deletes (irretrievably) page headers from
                       the text following the cursor location

      Alt R    14      replaces a search string with a new
                       string

      Alt S     4      displays WORDFLEX status

      Alt T     8      centers current line

      Alt W     6      sets right margin at the current cursor
                       position

      Alt X    24      exits from Alt H or Alt S display

      Alt Z    24      erases contents of all memory buffers
