checksum32, checksum32file

Calculates the 32bit-checksum of a string or a file. (version 4.78 or later)

checksum32 <intvar> <string>
checksum32file <intvar> <filename>

Remarks

This macro function calculates the checksum(32bit) of a string or a file.

The calculated value stores the variable "intvar" as mathematical value.
If the <filename> file can not open by using checksum32file, the system variable "result" is set to -1.

Example

str = 'this is a test string to be checksum32ed'
checksum32 crc str

; Display checksum32 result asHEX
sprintf '0x%08X' crc
messagebox inputstr 'checksum32 = '

checksum32file crc 'foo.bin'
if result = -1 then
    messagebox 'file open error' 'checksum32 = '
else
    sprintf '0x%08X' crc
    messagebox inputstr 'checksum32 = '
endif