Alternate Entry Name: .XLATE
B:
xlate( outstr, outpos, instr, inpos, table, outlen
[, outype, intype, inlen, fill] );
C:
void xlate(void *outstr, int outpos,
const void *instr, int inpos,
void *table, int outlen [, int outype,
int intype, int inlen, int fill] );
XLATE copies the input string to the output, and translates it according to the table of nine-bit characters specified by "table". If the input string is shorter than the output string, the input string is logically extended on the right with the "fill" character. Note that the "fill" character is translated.
Translation is performed as follows. An input character is obtained. The value of this character is used as an index into "table" (as in "char(table, c)" ), and the value obtained is placed into the output string. This process is repeated for each character in the input string, including any "fill" characters on the end.
/* Translate 4 bit hex to ASCII. */
table {"0123456789abcdef"};
...
extrn table;
xlate( outstr, 0, instr, 0, table, count, 9, 4 );
Copyright © 1996, Thinkage Ltd.