Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Calculates a hash value of a given string key using different hash functions.

A hash function is a reproducible method of turning some kind of data (string) into a (relatively) small number that may serve as a digital "fingerprint" of the data.

 

Syntax

 

n = HASH (HashType, sKey [, MaxValue])

 

Returns

 

Number between 1 and %MAXDWORD

 

Parameters

 

Name

Type

Optional

Meaning

HashType

Numeric

No

You can choose from 2 different type of hash algorithm. Indicate here 1 or 2. Both algorithms try to return the best distributed value.

sKey

String

No

String expression

MaxValue

Numeric

Yes

Optional maximum value you want the function to return. If present, MaxValue will be used to compound the MOD of the returning value.

 

Remarks

 

More info can be found here: http://en.wikipedia.org/wiki/Hash_function

 

Restrictions

 

If sKey is an empty string, zero will be returned.

 

See also

 

Examples

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software