PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
diffCreate (Function)
In French: diffCrée
Compares two buffers and creates a buffer containing the differences between these two buffers.
This difference buffer contains the differences between the former buffer and the new buffer. It can be applied to the less recent buffer to get the new buffer via diffApply.

This function can be useful when updating a file by Internet: all you have to do is send the difference file and apply it when it is received.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 19 and later
Stored procedures This function is now available in the code of stored procedures.
New in version 19
Stored procedures This function is now available in the code of stored procedures.
Stored procedures This function is now available in the code of stored procedures.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Compare two buffers
SourceBuffer is Buffer
EndBuffer is Buffer
// Load the buffers
// ..
MyDifferenceBuffer is Buffer
MyDifferenceBuffer = diffCreate(SourceBuffer, EndBuffer, diffBinary)
Syntax
<Result> = diffCreate(<Former Buffer> , <New Buffer> [, <Options> [, <Percentage>]])
<Result>: Buffer variable
Description of differences between the two buffers. This buffer can be applied to the former buffer to get the new buffer via diffApply.
<Former Buffer>: Buffer variable
Name of buffer containing the less recent data.
<New Buffer>: Buffer variable
Name of buffer containing the more recent data.
<Options>: Optional Integer constant (or combination of constants)
Used to choose the algorithm for calculating differences. The available options are as follows:
diffBinaryBinary comparison of files.
diffFilePCSBinary comparison of files optimized for the files created by WINDEV, WEBDEV and WINDEV Mobile.
diffMaxPercentageComparison of files with a maximum percentage of differences.
This constant can be combined with diffBinary, diffFilePCS or diffText. In this case, <Percentage> must be specified.
Caution: this constant must not be used if the buffers are too small.
diffTextText comparison (which means line by line) of files.
<Percentage>: Optional integer
Maximum percentage of differences allowed for creating the difference buffer.
If this percentage is exceeded, the difference buffer is empty and the ErrorOccurred variable is set to True. By default, the value of this parameter corresponds to 50%.
This parameter is taken into account only if the diffMaxPercentage constant was specified.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Linux wd230std.so
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment