Features
m4 offers these facilities:
- a free-form syntax, rather than line based syntax
- a high degree of macro expansion (arguments get expanded during scan and again during interpolation)
- text replacement
- parameter substitution
- file inclusion
- string manipulation
- conditional evaluation
- arithmetic expressions
- system interface
- programmer diagnostics
- programming language independent
- human language independent
- provides programming language capabilities
Unlike most earlier macro processors, m4 does not target any particular computer or human language; historically, however, its development originated for supporting the Ratfor dialect of Fortran. Unlike some other macro processors, m4 is Turing-complete as well as a practical programming language.
Unquoted identifiers which match defined macros are replaced with their definitions. Placing identifiers in quotes suppresses expansion until possibly later, such as when a quoted string is expanded as part of macro replacement. Unlike most languages, strings in m4 are quoted using the backtick (`) as the starting delimiter, and apostrophe (') as the ending delimiter. The use of separate starting and ending delimiters allows for the arbitrary nesting of quotation marks in strings, allowing a fine degree of control of how and when macro expansion takes place in different parts of a string.
Read more about this topic: M4 (computer Language)
Famous quotes containing the word features:
“These, then, will be some of the features of democracy ... it will be, in all likelihood, an agreeable, lawless, particolored commonwealth, dealing with all alike on a footing of equality, whether they be really equal or not.”
—Plato (c. 427347 B.C.)
“All visible objects, man, are but as pasteboard masks. But in each eventin the living act, the undoubted deedthere, some unknown but still reasoning thing puts forth the mouldings of its features from behind the unreasoning mask. If man will strike, strike through the mask!”
—Herman Melville (18191891)
“Each reader discovers for himself that, with respect to the simpler features of nature, succeeding poets have done little else than copy his similes.”
—Henry David Thoreau (18171862)