HSH
Hash
This string function conducts a predetermined logical operation on a string value and returns a pseudo-random 2-byte binary string with a probability of duplication being 1 in 65536.
Syntax
Section titled “Syntax”HSH (string-value [, 2-byte-string] [,ERR=line-ref|,ERC=error-code])string-value- is any string.
2-byte-string- is an optional 2-byte string that is the result of a previous HSH function.
line-ref- is the program line number or label to branch to if an error is produced by this function.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”This function is associative, allowing results to be accumulated for use in later HSH functions. For this capability, an optional 2-byte string, which is the result of a previous HSH function, may be specified.
Examples
Section titled “Examples”HSH ("A")returns the string “0000000 01000001” (ASCII “A” HEX $0041$, or DECIMAL 65).
LET X$ = HSH (C$)if C$=“A”, has the same effect as the first example and assigns the value produced to X$.
HSH ("AB")returns the string “00000001 01000110”.
See also
Section titled “See also”From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF