Next: , Previous: , Up: AT commands   [Contents][Index]


5.5.8 ‘@f’: Format identifier or module name

This command begins the definition part.

The construction

@f identifier old_identifier

makes FWEAVE treat identifier like old_identifier. For example,

@f mytype int

says to treat the variable mytype just as int is treated (e.g., as a reserved word in C or C++).

Traditionally, C programmers needed to use this command to format identifiers that were defined in #include files. This annoying redundancy has now been eliminated by means of the ‘-H’ command, which tells FWEAVE to scan #include files automatically. See -H_.

The old_identifier may be one of the following special names, which insert extra spaces according to the positions of the underscores and behave as the part of speech indicated by the base names:

$_BINOP_
$_COMMA_
$_EXPR
$_EXPR_
$EXPR_
$UNOP_

These are useful for dealing with certain macro constructions. For example,

@f PLUS $_BINOP_
@m PLUS +
@m ADD(x, y) ((x) PLUS (y))

Without the format command, the ‘ADD’ macro will pretty-print without spaces before and after the ‘PLUS’.

When the current language is TeX, the format command can be used to change a category code according to the format

@f `TeXchar new_cat_code

Difficulties may ensue if one try to change the category code of ‘@’ in this way; a fully operational WEB for TeX is quite difficult and has been neither accomplished nor attempted.