Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(2007) checksum
Message
 
 
À
15/06/2000 12:49:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00374510
Message ID:
00380841
Vues:
25
crc32.zip Don't remember location right now.

>Hi Nadya and Ken,
>
> do you recall exactly which CRC32 function you are refering to in this thread? I found multiple CRC32 functions in the files section. Do you remember the posting member or the file number?
>
>Thanks in advance,
>
>Jon
>
>>Kenneth,
>>
>>Thanks a lot for your test program. I ran it and found duplicates too. About 6% duplicates for 10000 strings. CRC32 takes long time to execute, so I interrupted my second test with CRC32. It produced 4638 records so far with 700 duplicates in SYS(2007) and NO duplicates for CRC32. I think, I'd rather switch to CRC32, though I'm not 100% sure, it's necessary in my case.
>>I have function code in Memo field. This is my current code:
>>
>>********************************************************************
>>*  Description.......: FunctionCode1.DblClick()
>>*  Calling Samples...: 
>>*  Parameter List....: 
>>*  Created by........: Nadya Nosonovsky 05/24/2000 03:43:01 PM 
>>*  Modified by.......: Nadya Nosonovsky 05/24/2000 05:06:43 PM
>>********************************************************************
>>local lcFunCode, lcFilePath, lcFunName, lcFile, lcCheckSum
>>lcFunCode=rtrim(this.value)
>>lcCheckSum=sys(2007,lcFunCode)
>>lcFilePath=addbs(alltrim(thisform.pgfFunctions.pageEdit.Funpath1.value)) && Full path
>>lcFunName=alltrim(thisform.pgfFunctions.pageEdit.FunName1.value) && Function name
>>lcFile=lcFilePath+lcFunName+'.prg'
>>=strtofile(lcFunCode,lcFile)
>>modify command (lcFile)
>>lcFunCode=rtrim(filetostr(lcFile))
>>if sys(2007,lcFunCode)lcCheckSum && File was modified
>>    this.StatusBarText='Program '+lcFunName+' was modified...'
>>     this.value=lcFunCode
>>     this.Refresh()
>>endif
>>
>>It's very unlikely, I hope, to generate two identical check sums even using sys(2007). What do you think? Do I need to switch?
>>
>>Thanks in advance.
>>
>>>>Larry and Nadya,
>>>>
>>>>FYI: I've done some not-so-scientific tests on 10k random strings and found that CheckSum dupicates its checksum value
>>>>consistantly over 3% of the time. In the same test crc32 created a unique checksum number every time.
>>>>=============================================================================
>>>>I'd like to repeat this problem also, because I've implemented sys(2007) and it works fine so far. Could it be OS specific problem?
>>>>
>>>>========================================================================
>>>>May be someone has some better information on the reliability of Checksum
>>>
>>>Nadya,
>>>
>>>I've emailed you the test file I used to check Sys(2007) (did you get it?). It actually produced duplicate checksums in over 700 records
>>>out of 10K unique strings sometimes producing duplicate keys for three different strings.
>>>
>>>Ken
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform