ID Number: Q71415
1.00 1.10 | 1.00 1.10
MS-DOS | OS/2
docerr
Summary:
The Programmer's WorkBench (PWB) has two switches called rmargin and
wordwrap that affect behavior within the editor when typing towards
the end of a line. These two switches can be used together to force
line breaks as you type past a specified margin. However, the PWB
documentation for versions 1.00 and 1.10 is somewhat incomplete in
describing exactly how rmargin works.
More Information:
To use rmargin, the wordwrap switch must be set to "yes" to enable
word wrapping at the right margin. With wordwrap turned on, the number
specified by the rmargin switch controls the right column margin. The
C version 6.00 and 6.00a "Microsoft C Reference" manual (page 83)
describes the rmargin switch as follows:
Controls the right column margin used for wordwrap mode. Any
character typed to the right of this margin causes a line break.
The C 6.00 and 6.00a online help for rmargin changes the wording of
the second sentence above to the following:
A space typed to the right of this margin causes subsequent
characters to be placed on the following line.
In reality, neither of these descriptions is entirely true. There are
two ways that an automatic line break will occur:
1. If any space is typed after the column specified by rmargin, a
forced line break will occur at that point.
2. If any word extends six characters past the rmargin column, a forced
line break will be inserted before the word, causing the word to be
moved to the next line. The documentation neglects any mention of
this behavior.
These are the only two cases where PWB will force a line break. PWB
does not immediately wordwrap when a character is typed past the
right margin as one might expect.
In some cases, you may want to ensure that you do not have any text
after a specified column. This can be done by setting rmargin to six
less then the last column in which you want text to appear. A simple
formula for this is:
rmargin = last_column_to_allow_text - 6
By setting rmargin to a value as indicated by this formula, a line
break will occur if a space is inserted into any of the last six
columns before the column specified by last_column_to_allow_text, or a
word will be moved down to the next line if it extends past
last_column_to_allow_text. Thus, no characters will ever be allowed to
the right of last_column_to_allow_text.