Home | Sign in | English EN

WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
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.
New in version 27
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
// Compare two buffers
SourceBuffer is Buffer
EndBuffer is Buffer
// Load the buffers
// ..
MyDifferenceBuffer is Buffer
MyDifferenceBuffer = diffCreate(SourceBuffer, EndBuffer, diffBinary)
<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:
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.
Business / UI classification: Business Logic
Component: wd270std.dll
Minimum version required
  • Version 15
This page is also available for…
Click [Add] to post a comment