Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating a Checksum32 on a File
Message
From
29/11/1999 15:32:12
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00296267
Message ID:
00296530
Views:
20
>>>nCheckSum = SYS(2007,FILETOSTR(cFileToCheckSum))
>>
>>Thanks for pointing out the breadth and depth of VFP! I never dreamed a database language would include such a low-level function.
>>
>>OTOH I'm using VFP5, with no FILETOSTR(); I guess I'll have to set up a temporary cursor with a binary memo field, and run SYS(2007) against that.
>>
>
>That'll work. Since SYS(2007) was originally used to provide a little validation of memor field contents, you should not run into problems.

I just tried it out, it works fine. I did another experiment, though - I wondered if adding another parameter would automagically invoke the 32-bit version. It doesn't seem to - all values I encountered were within the 16-bit boundary - but it does accept the third parameter, and the values returned are different:

SYS(2007, Alias.BinaryMemoField) = ValueX
SYS(2007, Alias.BinaryMemoField, 0) = ValueX
SYS(2007, Alias.BinaryMemoField, -1) = ValueX

Other third parameter values from -3 to +5 all yield different results, none equal to ValueX.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform