MyChat Scripts Engine: CRC32
Calculate CRC32 checksum of a specified text string.
Syntax
function CRC32(sData: string): integer;
Parameters and return values
Parameter |
Type |
Value |
sData |
string |
source string. |
Function result
Numeric value of the checksum.
Example
const
sMessage = 'Sweet home Alabama!';
begin
mLogScript('Original message: ' + sMessage, '');
mLogScript(IntToStr(CRC32(sMessage)), 'CRC32');
end.
Script work result
[22:38:49] (Log "CRC32"): Original message: Sweet home Alabama!
[22:38:49] (Log "CRC32"): [CRC32] -798107469
[22:38:49] (Run "CRC32"): Script operation time: 7 ms
[22:38:49] (Run "CRC32"): Script done successfully.