=================================================================
README.MCV                                                 1/1/97
=================================================================

The following information is included:

*    Introduction

*    Error Messages

*    Conversion Warnings


INTRODUCTION
============
This README file contains information about MCV.EXE, the Macro
Conversion Program that converts macros from Corel WordPerfect
5.1 for DOS to Corel WordPerfect 6.x for DOS.

The Macro Conversion Program can convert one or more macros. Once
The macros have been converted, they can be opened in Corel
WordPerfect 6.x just as you would open any other document.
Since Corel WordPerfect 6.x macros are essentially documents,
commands are simply words typed in the document. This lets you
use the powerful Corel WordPerfect editing tools when you write
macros. When the macro is saved or played, it is automatically
compiled into a language Corel WordPerfect can understand.
This compilation process causes no visual changes to the macro
or macro commands.

The Macro Conversion Program marks problems and warnings in
the macro as comments. If you need debugging help, Corel
WordPerfect has an improved debugger to help you step
through macro execution and search for problems.

When conversion problems or warnings occur, modifying the
original Corel WordPerfect 5.1 macro and reconverting it may be
the easiest way to get it up and running.

If you are familiar with the Corel WordPerfect 5.1 macro
language, you can adjust to the Corel WordPerfect 6.x macro
language by first writing a macro in Corel WordPerfect 5.1,
converting it, and noticing how the Macro Conversion
Program converted the macro.


ERROR MESSAGES
==============
This section of this file documents some error messages that may
be placed in the converted Corel WordPerfect 6.x macro document.

Label already referenced with different keystrokes
--------------------------------------------------
This error occurs when a label that was initially referenced
while Corel WordPerfect was in one state (for example, while
Block is turned on) is subsequently referenced while Corel
WordPerfect is in another state. The Macro Conversion program
flags this as a problem because the tokens that the Macro
Conversion Program creates are sometimes dependant on what state
or mode Corel WordPerfect is in at the time. Below is an example
of a converted macro with this problem. (The numbers at the
beginning of each line are for reference purposes only.)

Example 1:

Original 5.1 macro              Converted 6.x macro
------------------------------  -------------------------------
{CALL}move~                      1  CALL(move)
{Word Left}                      2  PosWordPrevious
{Block}{End}                     3  BlockOn(CharMode!) PosLineEnd
{CALL}move~                      4  CALL(move
{Page Down}                      5  //*** Conversion problem ***
{CALL}move~                      6  //*** Label already referenced with
{GO}format~                      7  //different keystrokes
{LABEL}move~                     8  //{Block}{End}
{Move}12                         9  )
{Switch}                        10  PosPageNext
{Home}{Home}{Down}              11  CALL(move
{Enter}                         12  //*** Conversion problem ***
{Home}{Home}{Down}              13  //*** Label already referenced with
{Enter}                         14  different keystrokes
{Switch}                        15  //{Block}{End}{Page Down}
{RETURN}                        16  )
{LABEL}format~                  17  GO(format)
                                18  LABEL(move
                                19  //*** Conversion problem ***
                                20  //*** Ambiguous keystrokes leading
                                21  to label
                                22  )
                                23  BlockOn(SentenceMode!) CopyAndPaste
                                24  SwitchDoc
                                25  PosDocBottom
                                26  MoveModeEnd
                                27  PosDocBottom
                                28  EnterKey
                                29  SwitchDoc
                                30  RETURN
                                31  LABEL(format)

In the above example, the MOVE label is first referenced on line
1. Notice that on line 3 the Block feature is turned on, and then
on line 4, the MOVE label is again referenced. The Macro
Conversion Program remembers what state Corel WordPerfect was in
when the MOVE label was first referenced on line 1. Since Corel
WordPerfect will be in a different state (BlockOn) when the MOVE
label is referenced on line 4, the Macro Conversion Program
generates the error "Label already referenced with different
keystrokes."  On line 8 the Macro Conversion Program displays
the Corel WordPerfect 5.1 commands (i.e., {Block}{End}) that
triggered the error. Once this error has occurred, any subsequent
references to that label (including references made in the same
state as the first reference) will generate the error as can
be seen by referring to line 11 where LABEL(move) has been
referenced a third time. To see why there is a problem, refer
to line 23 and notice that the Macro Conversion Program has
converted "{Move}12" to "BlockOn(SentenceMode!) CopyAndPaste,"
which are the proper tokens when this label was first referenced
in line 1. However, when LABEL(move) is referenced the second
time with block on, the BlockOn(SentenceMode!) would be an
unnecessary token and would generate an error if the macro were
played. Consequently, the Macro Conversion Program has generated
an additional error on line 20, "Ambiguous keystrokes leading to
label," because LABEL(move) has been referenced while Corel
WordPerfect was in different states; and although the tokens
created are correct for the first reference, they are likely to
be incorrect for the reference made when Corel WordPerfect was in
a different state.

There are also instances where the Macro Conversion Program will
generate this error, yet the macro will execute properly, as in
the following example.

Example 2:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ----------------------------------
{CALL}search~                    1  CALL(search)
WordPerfect                      2  Type("WordPerfect")
{Page Down}                      3  PosPageNext
{Block}                          4  BlockOn(CharMode!)
{CALL}search~                    5  CALL(search
{Word Left}                      6  //*** Conversion problem ***
{Macro Commands}                 7  //*** Label already referenced with
3client{Enter}                   8  different keystrokes
{GO}add~                         9  //{Block}
{LABEL}search~                  10  )
{Search}Company:ú               11  PosWordPrevious
{Search}                        12  ASSIGN(client; ?BlockedText)
{RETURN}                        13  GO(add)
{LABEL}add~                     14  LABEL(search
                                15  //*** Conversion problem ***
                                16  //*** Ambiguous keystrokes leading
                                17  to label
                                18  )
                                19  SearchString("Company:  ")
                                20  SearchNext(Regular!)
                                21  RETURN
                                22  LABEL(add)

In this particular case, the tokens SearchString("Company:  ")
SearchNext(Regular!) on lines 19 and 20 are correct whether Block
is turned on or off. Consequently, this macro will execute
properly and the conversion problems can be ignored. Why does
the Macro Conversion Program still generate an error if the macro
will run properly?  The Macro Conversion Program converts macros
from top to bottom in a single pass. Consequently, the
keystrokes in the referenced label are not encountered until
it has already passed and converted the references to it.
The Macro Conversion Program only knows that the state or mode of
Corel WordPerfect for the second reference to the label is
different from the state when the label was first referenced, and
that there may be a problem.

If there are no other problems that would keep the macro from
compiling or running properly, first try ignoring the errors.
Play the macro to see if it will run correctly. If that fails,
edit the Corel WordPerfect 5.1 macro and insert the actual
keystrokes of the label referenced. If that label is referenced
often in different states, it may be easier to create a duplicate
label, give it a different name, and reference it when in a
different state. For example, the Corel WordPerfect 5.1 macro in
Example 1 could be changed as follows:

Original 5.1 macro    Approach A:           Approach B:
--------------------  --------------------  ---------------------
{CALL}move~           {CALL}move~           {CALL}move~
{Word Left}           {Word Left}           {Word Left}
{Block}{End}          {Block}{End}          {Block}{End}
{CALL}move~           {Move}12              {CALL}moveblock~
{Page Down}           {Switch}              {Page Down}
{CALL}move~           {Home}{Home}{Down}    {CALL}move~
{GO}format~           {Enter}               {GO}format~
{LABEL}move~          {Home}{Home}{Down}    {LABEL}move~
{Move}12              {Enter}               {Move}12
{Switch}              {Switch}              {Switch}
{Home}{Home}{Down}    {Page Down}           {Home}{Home}{Down}
{Enter}               {CALL}move~           {Enter}
{Home}{Home}{Down}    {GO}format~           {Home}{Home}{Down}
{Enter}               {LABEL}move~          {Enter}
{Switch}              {Move}12              {Switch}
{RETURN}              {Switch}              {RETURN}
{LABEL}format~        {Home}{Home}{Down}    {LABEL}moveblock~
                      {Enter}               {Move}12
                      {Home}{Home}{Down}    {Switch}
                      {Enter}               {Home}{Home}{Down}
                      {Switch}              {Enter}
                      {RETURN}              {Home}{Home}{Down}
                      {LABEL}format~        {Enter}
                                            {Switch}
                                            {RETURN}
                                            {LABEL}format~

If {LABEL}move is referenced only once with Block turned on, then
you can use approach A or B to solve the problem. If {LABEL}move
is referenced often with Block on, then approach B would be the
most efficient solution.

Ambiguous keystrokes leading to label
-------------------------------------
This error is related to the "Label already referenced with
different keystrokes" error message and occurs in the actual
label that is being referenced by routines in different states or
modes. Correcting the "Label already referenced" error message
will also solve this problem.

Control transfer with pending token
-----------------------------------
The Macro Conversion Program makes one pass from top to bottom
when converting macros. Consequently, when you convert a series
of keystrokes to the proper token, the Macro Conversion Program
cannot "jump" to another routine to convert the rest of the
necessary keystrokes to complete that token. For example, if a
{GO} or {CALL} is encountered while a token is yet to be
completed, that token cannot be completed and this error
will be generated.

Example 3:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ---------------------------------
{Retrieve}                       1
{CALL}filename~{Enter}           2  CALL(filename) Paste
{GO}address~                     3  GO(address)
{LABEL}filename~                 4  LABEL(filename)
letter.doc                       5  RETURN
{RETURN}                         6  //*** Conversion problem***
{LABEL}address~                  7  //*** Control transfer with
                                 8  pending token
                                 9  //{Retrieve}letter.doc
                                10  LABEL(address)

This error will also occur if a WHILE, FOR, or IF statement
occurs in the middle of creating a token. In the example below,
an IF statement occurs in the middle of creating a line spacing
token.

Example 4:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ---------------------------------
{TEXT}1~                         1  GETSTRING(VAR1;
Pleaseúenterúyourúname:úú~       2  "Please enter your name:  ")
{Format}16                       3  IF(VAR1="") DISCARD(VAR1)
{IF}"{VAR 1}"="John"~            4  ENDIF
     2                           5  IF(""+VAR1+""="John")
{ELSE}                           6  ELSE
     1.5                         7  //*** Conversion problem ***
{END IF}                         8  //*** Control transfer with
{Enter}                          9  // pending token
{Exit}                          10  //{Format}162
                                11  ENDIF
                                12  LineSpacing(1.5)

In the Corel WordPerfect 5.1 macro, replace the {GO} or {CALL}
with the keystrokes of the label that is referenced. If the
problem is caused by a WHILE, FOR, or IF statement, restructure
the routine so the statement is not within the series of
keystrokes that would need to be converted to a token. For
example, the Corel WordPerfect 5.1 version of the macro above
(Example 4) could be changed as follows:

Original 5.1 Macro              5.1 Macro After Change
------------------------------  ---------------------------------
{Format}16                      {IF}"{VAR 1}"="John"~
{IF}"{VAR 1}"="John"~              {ASSIGN}line~2~
   2                            {ELSE}
{ELSE}                             {ASSIGN}line~1.5~
   1.5                          {END IF}
{END IF}                        {Format}16
{Enter}                         {VARIABLE}line~
{Exit}                          {Enter}
                                {Exit}

After making the changes to the Corel WordPerfect 5.1 macro,
reconvert it using the Macro Conversion Program.

Pending tokens leading to label
-------------------------------
This error is related to "Control transfer with pending token"
errors generated by {GO} or {CALL} commands. This error occurs
when part of the arguments for the token being created are
found in another label being referenced by the {GO} or {CALL}.
The error will appear in the label being referenced by that {GO}
or {CALL}.

Example 5:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ---------------------------------
{Columns/Tables}21               1
5{Enter}                         2
{CALL}rows~{Enter}               3  CALL(rows
{Exit}                           4  //*** Conversion problem***
{QUIT}                           5  //*** Control transfer with
{LABEL}rows~                     6  //pending token
5                                7  //{Columns/Tables}2
{RETURN}                         8  15{Enter}
                                 9  ) TableCreate(5;
                                10  //*** Conversion warning***
                                11  0)
                                12  QUIT
                                13  LABEL(rows
                                14  //***Conversion problem***
                                15  //*** Pending tokens
                                16  //leading to label
                                17  )
                                18  RETURN

Notice that in line 3 in the Corel WordPerfect 5.1 macro, the
number of rows for the table being created (which would be one
of the arguments that the Macro Conversion Program would need to
create the proper token) is located after {LABEL}rows~ on line
13. This situation will cause a "Control transfer with pending
token" error. The Macro Conversion Program then generates
a corresponding error "Pending tokens leading to label" at
{LABEL}rows~, showing that this LABEL was referenced when
arguments for a token were not complete.

Solving the "Control transfer with pending token" error message
will fix this problem.

Cannot generate matching 6.x Search text
----------------------------------------
This error occurs when the Macro Conversion Program is unable to
create the equivalent search text or code for Corel WordPerfect
6.x. The reasons for this can vary from the character not existing
in Corel WordPerfect 6.x (see line 5 in Example 6 below) to having
a conditional statement such as an IF within the beginning and
ending search commands (see line 16 in Example 6 below).

Example 6:

Original 5.1 Macro              Macro converted to 6.x
------------------------------  ---------------------------------
{Search}                         1  //*** Conversion problem ***
{^A}                             2  //*** Cannot generate matching 6.x
{Search}                         3  //Search text
{Block}{Word Right}              4  //{Search}
{Macro Commands}                 5  //{^A}
31{Enter}                        6  SearchString("") SearchNext(Regular!)
{TEXT}3~Pleaseúenterúyourúlastú  7  BlockOn(CharMode!) PosWordNext
name:úú~
{Search}                         8  ASSIGN(VAR1; ?BlockedText)
{IF}"{VAR3}"                     9  GETSTRING(VAR3; "Please enter your
="Smith"~Smith                  10  last name: ")
{ELSE}Contractor                11  IF(VAR3="") DISCARD(VAR3) ENDIF
{END IF}                        12  //*** Conversion problem ***
{Search}                        13  //*** Cannot generate matching
{Enter}{VAR 1}                  14  //6.x Search text
                                15  //{Search}
                                16  //{IF}"{VAR 3}"
                                17  //="Smith"~Smith
                                18  //{ELSE}C
                                19  //*** Limit exceeded for commands
                                20  //skipped
                                21  Type("ntractor") ENDIF
                                22  //*** Conversion problem ***
                                23  //*** Not at main document at end
                                24  //of macro
                                25  //*** Cannot convert to matching
                                26  //dialog
                                27  //{Search}{Enter}{VAR 1}

When the Macro Conversion Program generates this error, it will
not convert any commands until it encounters the ending {Search}
code. The commands not converted or "skipped" will be commented
out (using the "//" characters) as can be seen by referring to
lines 15-18. However, there is a limit to the number of commands
that will be skipped. When this limit is reached, the Macro
Conversion Program will generate a second message "Limit exceeded
for commands skipped" (see line 19) and will begin converting
again (see line 21). Usually this will cause other errors to
follow.

Frequently, this error is caused by previous errors. It may be
best to fix other problems first, reconvert and see if this
error is also eliminated. If not, check to see if the problem
is caused by an IF or a similar statement between the beginning
and ending {Search} commands. If this is the case, edit the Corel
WordPerfect 5.1 macro and restructure the statement so it
does not occur within the {Search} commands, then reconvert the
file. For example, the search statement in Example 6 above could
be changed as follows:

Original                        After changes
--------                        -------------
{Search}                        {IF}"{VAR 3}" ="Smith"~
{IF}"{VAR 3}" ="Smith"~         {ASSIGN}4~Smith~
Smith                           {ELSE}
{ELSE}                          {ASSIGN}4~Contractor~
Contractor                      {END IF}
{END IF}                        {Search}{VAR 4}{Search}
{Search}

Limit exceeded for commands skipped
-----------------------------------
See explanation for "Cannot generate matching 6.x Search text"
above.

Fragmented text input
---------------------
This error will occur when conditional statements such as an {IF}
or control flow statements using {CALL} or {GO} commands occur
within a save routine.

Example 7:

Original 5.1 Macro              Macro converted to 6.x
------------------------------  ---------------------------------
{Save}test                       1
{IF}{VAR 1}=1~                   2  IF(VAR1=1)
       .doc{Enter}               3  //*** Conversion problem ***
{ELSE}                           5  //*** Control transfer with
.txt{Enter}                      6  //pending token
{END IF}                         7  //{Save}test
                                 8  //*** Conversion problem ***
                                 9  //*** Fragmented text input
                                10  FileSave(".doc")
                                11  ELSE
                                12  //*** Conversion problem ***
                                13  //*** Fragmented text input
                                14  FileSave(".txt")
                                15  ENDIF

To resolve this error message, edit the Corel WordPerfect 5.1
macro and restructure the routine so the input for the save is
not fragmented. For example, the problem in Example 7 above
could be eliminated by editing the macro, deleting the word
test after {Save} on line 1 and then typing "test" in front of
".doc" on line 10 and again on line 14 before ".txt." Although
in most cases it will be easier for you to make the necessary
changes to the Corel WordPerfect 5.1 macro and then reconvert,
the macro above illustrates a situation where it is easier to
edit the converted macro. Note that typing the word test before
.doc on line 10 and before .txt on line 14 of the converted macro
will also solve the problem.

Not at main document at end of macro
------------------------------------
Cannot convert to matching dialog
---------------------------------

If a macro ends and does not leave you at the main document
screen, the Macro Conversion Program will attempt to convert
the keystrokes to the corresponding Corel WordPerfect 6.x dialog
command. If there is no matching dialog command for the
keystrokes at the end of the macro, these error messages will be
generated.

Example 8:

Original 5.1 Macro              Macro converted to 6.x
------------------------------  ---------------------------------
{List}C:\wp51{Enter}            1  //*** Conversion problem ***
                                2  //*** Not at main document at end of
                                3  //macro
                                4  //*** Cannot convert to matching
                                5  //dialog
                                6  //{List}c:\wp51{Enter}

In Example 8 above, the Corel WordPerfect 5.1 macro leaves the
user in the List Files screen. A FileManagerDlg dialog command
does exist in Corel WordPerfect 6.x, but this would not leave
the user in the List Files screen; consequently, the Macro
Conversion Program has flagged this as a problem.

To resolve this error message, first verify that the Corel
WordPerfect 5.1 macro does indeed end in a screen other than the
main editing screen. Sometimes previous conversion problems can
cause this error to occur. Since there is no matching dialog in
Corel WordPerfect 6.x, there is little you can do without
some knowledge of the Corel WordPerfect 6.x macro language. In
the above example, you can edit the Corel WordPerfect 5.1 macro
so it ends with only the command {List}, which the Macro
Conversion Program converts to the FileManagerDlg command. But
as was mentioned before, this would not leave you in the List
Files screen.

To get a converted macro with this problem to end exactly
as it did in Corel WordPerfect 5.1, you would need to become
familiar with the DLGINPUT command and the appropriate dialog
command in Corel WordPerfect 6.x. For example, to get the
converted macro above to end in the List Files screen, insert
the following tokens at the end of the converted macro:

DLGINPUT(On!)
FileManagerDlg
TYPE("C:\COREL\WP62")
Enterkey
DLGINPUT(Off!)

Name Missing
------------
This error message is generated when a macro selects an item from
a list, but does not do a name search. The Macro Conversion
Program is unable to generate a token, since it does not know
what item the cursor was highlighting.

Example 9:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ---------------------------------
{Font}4{Enter}12{Enter}         SAVESTATE PERSISTALL
                                AutoCodePlacement(OFF!)
                                WP51CursorMovement(ON!)
                                VARERRCHK(OFF!)
                                //*** Conversion problem ***
                                //*** Name missing
                                //{Font}4{Enter}
                                FontSize(12)

Notice the macro presses the font key (Ctrl+F8), 4, then presses
Enter to select the currently highlighted font.

The Macro Conversion Program did not have enough information to
generate a FONT("font name") token. The Corel WordPerfect 5.1
macro just selected the default font. In Corel WordPerfect 6.x it
is impossible to have a token of FONT(default). You must specify a
value, for example, FONT("Times Roman"). A Corel WordPerfect 5.1
macro that does not cause the error follows:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ---------------------------------
{Font}4nTimes Roman             SAVESTATE PERSISTALL
{Enter}{Enter}12{Enter}         AutoCodePlacement(OFF!)
                                WP51CursorMovement(ON!)
                                VARERRCHK(OFF!)
                                Font("Times Roman")
                                FontSize(12)

The Macro Conversion Program read the keystrokes during the name
search to know what font to include when it generated the
FONT("Times Roman") token.


CONVERSION WARNINGS
===================

Warning: Some characters skipped
--------------------------------
This warning occurs when a label or variable name contains char-
acters that are invalid in the Corel WordPerfect 6.x macro
language. The exception to this is a space that is converted to
an underscore character. When the Macro Conversion Program
encounters invalid characters, they are skipped or omitted. For
example, if there was a {LABEL}file+name~ statement in the Corel
WordPerfect 5.1 macro, it would be converted to LABEL(filename)
and then generate this warning.

The macro will need editing if the uniqueness of label or
variable names is being determined by invalid characters. For
example, if there were two labels in the Corel WordPerfect 5.1
macro called file+name and file-name, both would be converted to
filename, causing a compilation error. Instances where variable
names are converted to the same name would usually not generate
a compilation error, so it would be important to check for
duplicate variable names where this error has occurred. If
there are no problems with duplicate label or variable names,
then the warning can be ignored.

May edit incorrect line
-----------------------
The Macro Conversion Program generates this warning due to
graphics line editing differences between Corel WordPerfect
versions 5.1 and 6.x. When you edit a graphics line in Corel
WordPerfect 5.1, the type of line (vertical or horizontal) would
be indicated after positioning the cursor in the correct location.
In Corel WordPerfect 6.x, no distinction is made between vertical
and horizontal. Instead, the line number, the next line, or the
previous line is indicated.

Since the Macro Conversion Program cannot indicate a line number,
a GraphicsLineEditNext token will be created to indicate the line
to be edited. This may be a problem depending on cursor position
and if there are both vertical lines and horizontal lines in the
document.

Example 10:

Original 5.1 Macro              Corel 6.x Macro
------------------------------  ---------------------------------
{Graphics}53                     1  //*** Conversion warning ***
154{Enter}                       2  //*** May edit incorrect line
{Enter}                          3  GraphicsLineEditNext
{Down}{Down}                     4  GraphicsLineType(Horizontal!)
{Down}{Down}                     5  GraphicsLineHorizontalPosition(Set!;4)
{Graphics}53                     6  GraphicsLineEnd(Save!)
12                               7  PosLineDown PosLineDown
{Enter}                          8  PosLineDown PosLineDown
                                 9  //*** Conversion warning ***
                                10  //*** May edit incorrect line
                                11  GraphicsLineEditNext
                                12  GraphicsLineType(Horizontal!)
                                13  GraphicsLineHorizontalPosition(Right!)
                                14  GraphicsLineEnd(Save!)

The above macro edits two horizontal graphics lines. If the
cursor was initially placed before the first horizontal line
code, then the macro would edit the correct lines.

However, if the cursor was placed after the first horizontal
line code or if a vertical line code preceded the first
horizontal line code, then the macro would edit the wrong lines.

To resolve the error message, play the macro and see if it edits
the correct lines. If not, turn on Reveal Codes in the document
that the macro will be editing, note the line numbers of the
lines to be edited, and replace the GraphicsLineEditNext token in
the Corel WordPerfect 6.x macro with a GraphicsLineEdit token and
indicate the appropriate line number as the argument for that
token.

For example, suppose in example 9 above that the line
numbers of the horizontal lines that the macro should edit are 2
and 5. Change the GraphicsLineEditNext tokens on lines 3 and 11
to GraphicsLineEdit(2) and GraphicsLineEdit(5) respectively.