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
Macro (computer science)
(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!
==Procedural macros== {{unreferenced section|date=June 2014}} Macros in the [[PL/I]] language are written in a subset of PL/I itself: the compiler executes "[[preprocessor]] statements" at compilation time, and the output of this execution forms part of the code that is compiled. The ability to use a familiar [[procedural language]] as the macro language gives power much greater than that of text substitution macros, at the expense of a larger and slower compiler. Macros in PL/I, as well as in many assemblers, may have [[side effect (computer science)|side effect]]s, e.g., setting variables that other macros can access. [[Frame technology (software engineering)|Frame technology]]'s frame macros have their own command syntax but can also contain text in any language. Each frame is both a generic component in a hierarchy of nested subassemblies, and a procedure for integrating itself with its subassembly frames (a recursive process that resolves integration conflicts in favor of higher level subassemblies). The outputs are custom documents, typically compilable source modules. Frame technology can avoid the proliferation of similar but subtly different components, an issue that has plagued software development since the invention of macros and [[subroutine]]s. Most assembly languages have less powerful procedural macro facilities, for example allowing a block of code to be repeated N times for [[loop unwinding|loop unrolling]]; but these have a completely different syntax from the actual assembly language.
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)