Files
rdb/man/hashkey.man

45 lines
828 B
Groff

.TH hashkey "" "" "/rdb Command"
.PC "Return the hash offset for key strings"
\fBhashkey \fIrows keystring ...\fR
.PP
.II "indexing^hash key"
.II "hash-key indexing"
The command
.B hashkey
adds the ASCII value of each character in the
.IR keystring s
(except spaces or tabs), and returns the modulo of
.IR rows .
This is for computing the hash offset into hash-index table for
the hash fast-access method.
It is used by the command
.B append
to update the hash-index table.
.SH Example
Here we convert several characters.
The command
.DM
hashkey 11 ABCD
.DE
.PP
returns \fB2\fR.
(That is, ASCII values 65 plus 66 plus 67 plus 68 yields 266; which, when
divided by 11 yields a remainder of 2).
The command
.DM
hashkey 29 abcdefg
.DE
.PP
returns \fB4\fR.
.SH "See Also"
.B
append
ascii,
chr
.R
.br
COHERENT Lexicon:
.B
ASCII
.R