M4 (computer Language) - Features

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:

    All visible objects, man, are but as pasteboard masks. But in each event—in the living act, the undoubted deed—there, 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 (1819–1891)

    Art is the child of Nature; yes,
    Her darling child, in whom we trace
    The features of the mother’s face,
    Her aspect and her attitude.
    Henry Wadsworth Longfellow (1807–1882)