www.icetips.com  Icetips Utilities Documentation 5/15/2014    

Utility Class: CompareCRC32

Previous  Top  Next  


Prototype: (String pBuffer, Ulong pCRC),Byte

 

pBufferString to compare CRC value for

 

pCRCThe CRC value to compare the CRC from the buffer to.

 

ReturnsTrue 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:

GetCRC32

 

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/comparecrc32_utility.htm