fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
COMPARE VERSIONS [ <symbol> ]
This command is used to compare different versions of the same sub-program.
When fpt reads multiple copies of a sub-program, the second and subsequent copies are renamed by adding the suffix _1, _2 etc. to the original sub-program name. A warning is issued that duplicates are present in the code.
The command COMPARE VERSIONS, written without an argument, instructs fpt to compare all the available versions of all duplicated sub-programs. If the command is made on the command line or in an fsp file, the warning that duplicates are present is reduced in severity to a note.
The command COMPARE VERSIONS written with a sub-program name as an argument, instructs fpt to compare the available versions of the named sub-program. The sub-program name may be enclosed in quotation marks, and is required to be enclosed in quotation marks if it contains exotic characters such as ':' (Please see the command ACCEPT CHARACTER).
Please note that fpt compares all possible combinations of a duplicated sub-program. Thus, if two copies of the sub-program are present, one comparison is made. If three copies are present, three comparisons are made. If four copies are present, six comparisons are made and so on.
When the sub-programs are compared, fpt reports whether the:
Where to Use this Command
|Operating system command line||Yes|
|Configuration file, config.fsp||No|
|Specification (fsp) files, *.fsp||Yes|
|Interactively, to FPT> prompt||Yes|
|Interactive command files||Yes|
|Embedded in the Fortran code||Yes|
Versions are not compared by default (Note that defaults may be changed in the configuration file).
On the (Linux) command line:
$fpt %compare_versions simplex.fsp
The listing (fpl) file shows:
Comparing sub-programs ---------------------- INDATA line: 28 file: D:\JOHN\FPT\FPTTEST\T1.FOR INDATA_2 line: 33 file: D:\JOHN\FPT\FPTTEST\T2.FOR Sub-programs differ: ****** INDATA line: 3 DO WHILE (I .LT. NDATA) ****** INDATA_2 line: 2 I=1 ****** Comparing sub-programs ---------------------- SIMPLX line: 7 file: D:\JOHN\FPT\FPTTEST\T1.FOR SIMPLX_2 line: 12 file: D:\JOHN\FPT\FPTTEST\T2.FOR Headers differ *** Comments match Declarations match Names match DATA statements match Executable code is functionally identical Comparing sub-programs ---------------------- SUMSQ line: 17 file: D:\JOHN\FPT\FPTTEST\T1.FOR SUMSQ_2 line: 22 file: D:\JOHN\FPT\FPTTEST\T2.FOR Headers differ *** Comments differ *** Declarations match Names differ *** DATA statements match Executable code is functionally identical Corresponding names and labels SUMSQ SUMSQ_2 ----- ------- A ALPHA
Copyright ©1995 to 2019 Software Validation Ltd. All rights reserved.