Metasyntactic variable

from Wikipedia, the free encyclopedia

A metasyntactic variable is a variable in the computer - program code that only naming any entities used in examples. Otherwise, a metasyntactic variable has no meaning.

The term comes from programming , where it is most used. A programmer usually does not use a metasyntactic variable in a real, finished program if he can use a meaningful name instead.

The name of the term comes from the fact that the variables are used on a higher language level than the program - namely for description ( metalanguage ).

They often appear in series and are culture-specific, e.g. B.

In particular, foo appears as an exemplary object in many example programs.

There are also “metasyntactic values”, the number 42 as the answer to life, the universe and all the rest , the 23 as the supposed Illuminati number and as a cross sum of the latter also the  5 . The 4711 and 08/15 are also very common in German-speaking countries . Finally, hexadecimal numbers such as DEADBEEF are also used for 32-bit values ​​(see Hexspeak ). "Example.com", "example.net" and "example.org" were specified as metasyntactic values ​​for domain names .

In the humorous RFC 3092 an explanation of the etymology of Foo was put forward and the order of the metasyntactic variables bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud was declared.

See also

Web links

Individual evidence

  1. Metasyntactic variable (English)
  2. RFC 2606 (English)