Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
M4 (computer language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Features== m4 offers these facilities: * a [[Free-form language|free-form syntax]], rather than [[line-based syntax]] * a high degree of macro expansion (arguments get expanded during scan and again during interpretation) * 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. Separate starting and ending delimiters allows the arbitrary nesting of quotation marks in strings to be used, allowing a fine degree of control of how and when macro expansion takes place in different parts of a string.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)