PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Comparing two files
  • Comparing two files (WINDEV Mobile)
fCompare (Example)
Comparing two files
WINDEVJavaUser code (UMC) The following code is used to compare the content of two files.
// Declare the variables
ComparedFile1 is string
ComparedFile2 is string
ResComparison is int

// Select the first file to compare
ComparedFile1 = "C:\Directories\FileA.doc"

// Select the second file to compare
ComparedFile2 = "C:\Directories\FileB.doc"

// Compare the two files
ResComparison = fCompare(ComparedFile1, ComparedFile2)

// Display the result
SWITCH ResComparison
CASE 0: Info("The two files are identical")
CASE 1: Info("The two files are different")
CASE -1: Info("The first file was not found")
CASE -2: Info("The second file was not found")
CASE -3: Error(ErrorInfo(errMessage))
END
Comparing two files (WINDEV Mobile)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment