ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous Windows functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
sComputeCrc32 (Function)
In french: sCalculeCrc32
Calculates the Cyclical Redundancy Check (CRC) of buffer.
Remark: CRC is comparable to a stamp signature. Any modification made to the buffer changes the CRC value. The use of CRC allows you to detect the possible file modifications during a transfer via network. You can compare the CRC of the file before and after transmission. If they are identical, the file was probably not modified during the transfer.
Example
// Calcule le CRC d'une chaîne
CRC is int
CRC = sComputeCrc32(MaChaîne)

// Transmet la chaîne et le CRC

// Vérification de l'intégrité de la chaîne
IF sComputeCrc32(MaChaîne) <> CRC THEN Info("Chaîne modifiée")
Syntax
<Result> = sComputeCrc32(<Buffer> [, <Partial CRC>])
<Result>: Integer
Control value of string (CRC)
<Buffer>: Buffer or character string
String or buffer used to calculate the control value (CRC)
<Partial CRC>: Optional integer
Result of a previous CRC calculation. This parameter is used to calculate the CRC of two consecutive buffers: it is not necessary to concatenate the buffers. This parameter corresponds to 0 (a single buffer is managed) by default.
JavaPHP This parameter is ignored. A single buffer is managed.
Remarks
sComputeCrc32 is identical to sComputeCrc16, but it is faster and more efficient.
Business / UI classification: Business Logic
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help