*** Welcome to piglix ***

Metasyntactic variable


A metasyntactic variable is a meaningless word used as a placeholder in computer science, intended to be substituted by some objects pertaining to the context where it is used. The word foo as used in IETF Requests for Comments is a good example.

By mathematical analogy, a metasyntactic variable is a word that is a variable for other words, just as in algebra letters are used as variables for numbers.

"A standard convention is that any file with 'foo' in its name is temporary and can be deleted on sight." The names of these consecrated "metasyntactic variables" are also commonly used as actual identifiers (for variables, functions, etc.) in tutorial programming examples when their purpose is to emphasize syntax.

The term metasyntactic variable is an amalgamation of three components:

Both the IETF RFCs and computer programming languages are rendered in plain text, making it necessary to distinguish metasyntactic variables by a naming convention, more or less obvious from context. If rich text formatting is available, e.g. as in the HTML produced from texinfo sources, then a typographical convention may be used, as done for the example in the GNU Fortran manual:

Plain text example:

RFC 772 (cited in RFC 3092) contains for instance:


...
Wikipedia

...