The built-in macro DEFINECHARTABLE defines a character translation table. It takes two parameter lists: the name of the table and the character translations. Hence, each table is defined by its own name. As an example of a table, consider the following fragment. It defines a table that translates the upper case characters A to E to their lower case equivalents:
DEFINECHARTABLE(tolower)(
    'A' = "a"
    'B' = "b"
    'C' = "c"
    'D' = "d"
    'E' = "e"
)

Each DEFINECHARTABLE statement must have a non-empty second parameter. "Empty" character tables cannot be defined, though one non-translation table is built-in.

The syntaxis of the second parameter list is as follows:

Translations which are not specified in the table are left to the default, which is to output the character as-is.

Note that the character table translation is something that the yodl program does as one of its last actions, just before sending text to the output file. The expansion text is not further processed by yodl, except for the conversion of C-type escape sequences to ordinary characters. The expansion text should therefore not be protected by, e.g., NOTRANS (unless of course you want some character to generate the text NOTRANS on the output).


Go back to index of Yodl.

Please send Yodl questions and comments to yodl@icce.rug.nl.

Please send comments on these web pages to (address unknown)

Copyright (c) 1997, 1998, 1999 Karel Kubat and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from Yodl-1.31.18 by

<(address unknown)>, Thu Jan 19 00:17:16 2006 MSK.