PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
  • Comparing two files
  • Comparing two files (WINDEV Mobile)
fCompare (Example)
Comparing two files
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser 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)
Windows Mobile The following code is used to compare the content of two files.
// Declare the variables
ComparedFile1 is string = "\My Files\File1.TXT"
ComparedFile2 is string = "\My Files\File2.TXT"
ResComparison is int
 
// 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
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment