FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


COMPARE VERSIONS

Syntax:

COMPARE VERSIONS [ <symbol> ]

Function:

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:


Without argument

With argument

Operating system command line

Yes

No

Configuration file, config.fsp

Yes

No

Specification (FSP) files, *.fsp

Yes

No

Interactively, to FPT> prompt:

No

Yes

Interactive command files

No

Yes

Embedded in the Fortran code

Yes

No

Default:

Versions are not compared by default (Note that defaults may be changed in the configuration file).

Example:

$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
 

See Also:

COMPARE SUB-PROGRAMS

ACCEPT CHARACTER


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.