Charizing Operator (#@)

Syntax

#@ identifier

There may be any amount of white space before identifier, including none.

For a combination of # and @ signs to be recognised as a #@ operator, it must occur in the body of a macro that has a non-empty argument list. Also, the /Ze option must be active (which is the default), since the #@ operator is a Microsoft-specific extension of the language. If these conditions are not satisfied, the # and @ are just a # and @, and pass through the preprocessor without warning.

It is an error (C2162) if identifier is missing or is not among the macro’s formal arguments.

Behaviour

The #@ operator acts within a macro body to direct that should the macro ever be expanded, the formal argument named by identifier is to be replaced not exactly by the corresponding actual argument but by this argument in a char-ised form. This means, briefly, that the argument becomes enclosed by single quotes. The operator itself, along with any white space that follows, does not pass into the expansion.