CalcIt Commands

FILECOMPARE(FileVar1, FileVar2, Start1=0, Start2=0, Size=minimum size rest of FileVar1 or FileVar2);

Compares equal sized parts of two files. The selected parts of the two files are compared byte by byte.

Returns an array where differences are reported in a three part delimited text as described below:

  1. Position relative to Start1 or Start2 for each file respectively indicating a difference.
  2. The value of the byte in the first file
  3. The value of the byte in the second file.

If the returned array is of zero elements then no differences found and the compared parts must be considered identical.

The parameters are:

  • FileVar1. First file to compare a part of it.
  • FileVar2. Second file to compare a part of it
  • Start1. Where the comparison starts inFileVar1. In bytes from the start of FileVar1. Optional. Zero if omitted.
  • Start2. Where the comparison starts in FileVar2. In bytes from the start of FileVar2. Optional. Zero if omitted.
  • Size. The number of bytes to compare. Optional. If omitted then the rest in each file is calculated after Start1 or Start2 and the smallest is selected.

It is used in array expressions.

See also Using File Variables, FileRecDef, FileDel, FileIns, FileToFile, READFile, ArrToFile, Size, FileRecs, FileAdd, FileSearch

Go Back