Examines two documents for differences in their content.
Scope: Global
Syntax
Parameters
DOCNUM n |
A document specified by Editor document number n. |
filename |
The name of a file including, if required, the directory path of that file. If filename is enclosed with " ", the file name and directory path can include blanks if permitted by the file system. |
path |
A directory path without a file name. If
path is enclosed with "", the directory
path can include blanks if permitted by the file system.
|
Description
The compare command examines two documents for differences in their content. Each document is placed in a new file view, and these new file views are placed side-by-side inside an Editor compare window. Between the two file views, a comparison bar highlights both similar and different sections of the two documents. Options for the compare command can be set from the Compare pull-down menu that appears in the menu bar of the Editor compare window.
If the compare command is issued without any file names or document numbers, there must be exactly two documents open in the Editor. The currently-active document appears in the file view on the left side of the Editor compare window.
If you specify only one file name or document number in the compare command, an Editor compare window opens with the currently-active document in the file view on left side of the window, and the specified document in the file view on the right side of the window.
If comparing two files that have the same name but reside in different directories, you can identify the second document by specifying only its directory location.
File names specified in the compare command that do not already exist will be created.
A document cannot be compared to itself.
Examples
compare
compare d:\config.sys
compare DOCNUM 4 DOCNUM 8
compare config.sys config.old
compare config.sys DOCNUM 4
compare /config.sys /backups
compare d:\config.sys c:\backups
compare /backups
compare \backups
API Return Codes
-4 |
Document number specified is not in valid range of 1 - 9999. |
-6 |
Document number specified is not open in the Editor. |
-7 |
No current document to compare. |
-8 |
Out of memory in compare. |
-11 |
Cannot compare document to itself. |
-12 |
Document failed to load. |
-13 |
Number of open documents is not two. |
