Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Macro (computer science)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Text-substitution macros== {{unreferenced section|date=September 2024}} {{See also|General-purpose macro processor|Assembly language#Macros|Algorithm}} Languages such as [[C (programming language) |C]] and some [[assembly language]]s have rudimentary macro systems, implemented as [[preprocessor]]s to the compiler or assembler. [[C preprocessor]] macros work by simple textual substitution at the [[Lexical token|token]], rather than the character level. However, the macro facilities of more sophisticated assemblers, e.g., [[IBM High Level Assembler]] (HLASM) can't be implemented with a preprocessor; the code for assembling instructions and data is interspersed with the code for assembling macro invocations. A classic use of macros is in the computer typesetting system [[TeX]] and its derivatives, where most functionality is based on macros.<ref>{{cite web |last1=Fine |first1=Johnathan |title=T E X forever! |url=http://svn.tug.org/TUGboat/tb27-0/fine.pdf |website=Tex Users Group |access-date=6 December 2024 |page=141 |quote=TEX has a macro programming language, which allows features to be added.}}</ref> [[MacroML]] is an experimental system that seeks to reconcile [[static typing]] and macro systems. [[Nemerle]] has typed syntax macros, and one productive way to think of these syntax macros is as a [[Metaprogramming|multi-stage computation]]. Other examples: * [[m4 (computer language)|m4]] is a sophisticated stand-alone macro processor. * [[TRAC programming language|TRAC]] * [[METAL|Macro Extension TAL]], accompanying [[Template Attribute Language]] * SMX: for web pages * [[ML/I|ML/1]] (Macro Language One) * [[troff]] and [[nroff]]: for typesetting and formatting Unix manpages. * [[CMS EXEC]]: for command-line macros and application macros * [[EXEC 2]] in [[Conversational Monitor System]] (CMS): for command-line macros and application macros * [[CLIST]] in IBM's [[Time Sharing Option]] (TSO): for command-line macros and application macros * [[REXX]]: for command-line macros and application macros in, e.g., [[AmigaOS]], CMS, [[OS/2]], TSO * [[SCRIPT (markup)#SCRIPT macros|SCRIPT]]: for formatting documents * Various [[Shell (computing)#Text (CLI) shells|shells]] for, e.g., [[Linux]] Some major applications have been written as text macro invoked by other applications, e.g., by [[XEDIT]] in CMS. ===Embeddable languages=== Some languages, such as [[PHP]], can be embedded in free-format text, or the source code of other languages. The mechanism by which the code fragments are recognised (for instance, being bracketed by <code><?php</code> and <code>?></code>) is similar to a textual macro language, but they are much more powerful, fully featured languages.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Macro (computer science)
(section)
Add topic