|
Previous Top Next |
Prototype: | (String pBuffer, Ulong pCRC),Byte |
pBuffer | String to compare CRC value for |
pCRC | The CRC value to compare the CRC from the buffer to. |
Returns | True or false depending on if the CRC values match. |
This methods takes a string buffer, calculates the CRC value for it and then compares it to the passed CRC value. If the calculated and passed CRC match the method returns True. If they do not match, the method returns False.
Example:
ITU ITUtilityClass
Loc:CRC ULong
Loc:TestString String(20)
Loc:CRCString String(20)
Code
Loc:TestString = 'Icetips Creative'
Loc:CRCString = 'Icetips Creative'
Loc:CRC = ITU.GetCRC32(Loc:TestString)
If ITU.CompareCRC32(Loc:CRCString,Loc:CRC)
Message('The strings match:)' &|
'|TestString = ' & Loc:CRC & |
'|CRCString = ' & ITU.GetCRC32(Loc:CRCString),'Strings match:)',ICON:Exclamation)
Else
Message('The strings do NOT match:(' &|
'|TestString = ' & Loc:CRC &|
'|CRCString = ' & ITU.GetCRC32(Loc:CRCString),'Strings do NOT match:(', ICON:Hand)
End
See also: