SourcePoint AMD Help

Table of Contents

fc

Compare two text files.

Syntax

[result =] fc("file1", "file2"[, start column[, end column]])

Where:

result

specifies a debug variable to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

file1, file2

specifies a filename. ย See Filenames for details.

start column

is the first column of each line to compare, start column = 0 equals the first column of the line.

end column

is the last column of the line to compare.

Discussion

The fc function is used to compare two text files. ย The function returns "true" if the files are identical within and including the start and end columns of every line. If the files mismatch, the mismatched line of each file is displayed with an underscore character indicating the first column of the mismatch.

Note: "Start column" and "end column" are optional input parameters. If not specified, the entire line is compared.

Example

Command input:

define bool result = fc("good.txt", "new.txt")

if (result == true)

ย ย ย ย ย puts("files match\n")

ย 

ย