Macro (computer science)
Character macros are supported in software applications to make it easy to invoke common command sequences.The term derives from "macro instruction", and such expansions were originally used in generating assembly language code.During the 1980s, macro programs – originally SmartKey, then SuperKey, KeyWorks, Prokey – were very popular, first as a means to automatically format screenplays, then for a variety of user-input tasks.These programs were based on the terminate-and-stay-resident mode of operation and applied to all keyboard input, no matter in which context it occurred.Keyboard macros can be used in massively multiplayer online role-playing games (MMORPGs) to perform repetitive, but lucrative tasks, thus accumulating resources.For this reason, use of macros is a violation of the TOS or EULA of most MMORPGs, and their administrators spend considerable effort to suppress them.Emacs was originally devised as a set of macros in the editing language TECO; it was later ported to dialects of Lisp.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 subroutines.Syntactic macro systems work instead at the level of abstract syntax trees, and preserve the lexical structure of the original program.A number of competing implementations of hygienic macros exist such as syntax-rules, syntax-case, explicit renaming, and syntactic closures.Recently, Racket has combined the notions of hygienic macros with a "tower of evaluators", so that the syntactic expansion time of one macro system is the ordinary runtime of another block of code,[23] and showed how to apply interleaved expansion and parsing in a non-parenthesized language.[27][28] The advent of modern programming languages, notably C, for which compilers are available on virtually all computers, has rendered such an approach superfluous.While macro instructions can be defined by a programmer for any set of native assembler program instructions, typically macros are associated with macro libraries delivered with the operating system allowing access to operating system functions such as In older operating systems such as those used on IBM mainframes, full operating system functionality was only available to assembler language programs, not to high level language programs (unless assembly language subroutines were used, of course), as the standard macro instructions did not always have counterparts in routines available to high-level languages.In the mid-1950s, when assembly language programming was the main way to program a computer, macro instruction features were developed to reduce source code (by generating multiple assembly statements from each macro instruction) and to enforce coding conventions (e.g. specifying input/output commands in standard ways).[32] Two of the earliest programming installations to develop macro languages for the IBM 705 computer were at Dow Chemical Corp. in Delaware and the Air Material Command, Ballistics Missile Logistics Office in California.[37] McIlroy's 1960 paper was seminal in the area of extending any (including high-level) programming languages through macro processors.[citation needed] In the 1980s and early 1990s, desktop PCs were only running at a few MHz and assembly language routines were commonly used to speed up programs written in C, Fortran, Pascal and others.