Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hash() Function in VFP
Message
From
22/10/2002 15:25:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
22/10/2002 10:38:52
Lakhani Anil
Lakhani Software Solutions
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00713481
Message ID:
00714034
Views:
62
>Thanks for reply, but sys(2007) doesn't gives unique number for two different string, but Hash() function of java gives one unique number for a particular string. do you have any idea in sys(2007) what must be string length limit of parrameter string?

Unless you use the string itself - or a string of the same length - there is no guarantee that any function, whether it is called hash or whatever, will produce unique results. This is mathematically impossible. The only thing you can do, if the resulting string is large enough, is reduce the probability of having two identical results, until the probability is zero for practical reasons.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform