TBL() Function - String Table Conversion
Syntax
TBL(string,string{,ERR=lineref})
TBL(string,TBL=lineref{,ERR=lineref})
Description
The TBL() function performs the string translation described in the TABLE verb. The first argument is the string to translate. The second argument, which specifies the translation table, may be either another string or a TBL=lineref reference. If the table is in a string, the string must be at least one byte long. If TBL= is used, it must refer to a TABLE statement.
In the example below, the TABLE statement has a table in which the characters "a" ($61$) through "z" ($7A$) are replaced by the characters "A" ($41$) to "Z" ($5A$). The following code illustrates the use of a table specified in a TABLE statement.
Examples
|
To use the table as a string in the first form of the TBL function, the conversion table must be specified as a hexadecimal string. The following code illustrates using the lower to upper case conversion table as a hexadecimal string. Note that the same table is used in both examples.
0010 LET A$="AaBbCcDdEeFfGgHhIi" |