11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

HASH<br />

Syntax<br />

HASH(rec.key,modulo,type)<br />

Description<br />

The <strong>UniBasic</strong> HASH function determines to which group a particular record key is<br />

hashed, depending on the modulo and the file type. HASH returns the group number<br />

in which a record with a key of rec.key is stored. HASH includes a file type<br />

parameter.<br />

When rec.key, modulo, and type are passed to the function, HASH returns the group<br />

number to which the record key will hash.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

1-327 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

rec.key Specifies the record key to hash.<br />

modulo Specifies the file modulo, the number of groups specified when the file was<br />

created.<br />

type For the file being tested, specifies static or dynamic and hash type, as determined<br />

when the file was created. You can use the following types:<br />

0 – Test a static file with hash type 0<br />

1 – Test a static file with hash type 1<br />

64 – Test a dynamic file with hash type 0<br />

65 – Test a dynamic file with hash type 1<br />

HASH Parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!