[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
XPcheckSum()
Perform a simple CheckSum on a Memo/Char variable
------------------------------------------------------------------------------
Function: XPcheckSum()
XPcheckSum() is a function that will count all the values
of the characters in a char/memo var and return a number
indicating the count (modulo 2^16). It is a simple way of
validating data, it won't fool everybody, but it can always
came in handy. XPcheckSum() is written in Assembly, and therefore
quite fast, no delay will be experienced on even big Memo
variables.
Syntax: XPcheckSum(cVar) --> nCheck
Arguments: <cVar> is the variable to check, and Char/Memo is ok.
Returns: <nCheck> is the result of the checkSum performed.
This could be used to check whether a Data file has
been altered, or whatever.
Usage: if XPcheckSum(MemoRead("MSG.DAT")) <> nSavedCheck
? "you have been messing with MSG.DAT"
QUIT
end
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson