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.
jEdit's macro editor
ISO 639 macrolanguagejEdit'scomputer programmingpatternmappedlexical tokenscharacterssyntax treesoftware applicationscommandprogramming languagescode reusedomain-specific languagesprogram statementblock of codeconditional assemblerprogramsoperating systemplatformassembly languageautomatedmacro recordersSmartKeyscreenplaysterminate-and-stay-residentword processorsspreadsheetsmassively multiplayer online role-playing gamesscripting languageVimscriptVisual Basic for ApplicationsMicrosoft OfficeConversational Monitor SystemThe Hessling EditorObject REXXMacro virus (computing)Microsoft Windows system callscomputer virusesmacro virusesMicrosoftfunctionC programming languageargumentin-line expansioninline functionsSchemerun-time code generationGeneral-purpose macro processorAlgorithmassembly languagespreprocessorsC preprocessorIBM High Level AssemblerMacroMLstatic typingNemerlemulti-stage computationMacro Extension TALTemplate Attribute LanguageCMS EXECEXEC 2Time Sharing OptionAmigaOSpreprocessorprocedural languageside effectsFrame technologysubroutinesloop unrollingabstract syntax treesS-expressionsPrologErlangElixirJavaScriptFEXPRsAI MemoAnaphoric macroHygienic macroreferential transparencyRacketlazy evaluationnon-strict functionscontrol structurescontinuationsstate machinesFelleisenanaphoric macroscomponentsmodulesSTAGE2 Mobile Programming Systembootstrapcompiler bootstrappingaccess methodssupervisor callsystem generationOS/360computerfeaturesmachine codehigh-level programming languagesFORTRANMacro AssemblersIBM 709Autocoder7070/7072/7074Douglas McIlroyBell Labshigh-levelmacro processorsMS-DOSCP/M-86standard librariessyscallsplatform-agnosticportabilityCompound operatorExtensible programmingFused operationMacro and securityProgramming by demonstrationString interpolationOxford English DictionaryStrachey, ChristopherIBM Corporation Layzell, P.Programming paradigmsComparison by languageImperativeStructuredJackson structuresBlock-structuredModularNon-structuredProceduralProgramming in the large and in the smallDesign by contractInvariant-basedNested functionObject-orientedcomparisonClass-basedPrototype-basedObject-basedImmutable objectPersistentUniform Function Call SyntaxDeclarativeFunctionalRecursiveAnonymous functionPartial applicationHigher-orderPurely functionalStrictDependent typesFunctional logicPoint-free styleExpression-orientedApplicativeConcatenativeFunction-levelValue-levelDataflowFlow-basedReactiveFunctional reactiveSignalsStreamsSynchronousAbductive logicAnswer setConstraintConstraint logicInductive logicNondeterministicOntologyProbabilistic logicAlgebraic modelingAutomata-basedActionSpacecraftDifferentiableEnd-userGrammar-orientedInterface descriptionLanguage-orientedList comprehensionLow-codeModelingNatural languageNon-English-basedPage descriptionfiltersProbabilisticQuantumScientificScriptingSet-theoreticSimulationStack-basedSystemTactileTemplatingTransformationGraph rewritingProductionVisualConcurrentdistributedparallelActor-basedAutomatic mutual exclusionChoreographic programmingConcurrent logicConcurrent constraint logicConcurrent OOMacroprogrammingMultitier programmingOrganic computingParallel programming modelsPartitioned global address spaceProcess-orientedRelativistic programmingService-orientedStructured concurrencyMetaprogrammingAttribute-orientedAutomaticInductiveDynamicExtensibleGenericHomoiconicityInteractiveHygienicMetalinguistic abstractionMulti-stageProgram synthesisBayesianInferentialby demonstrationby exampleReflectiveSelf-modifying codeSymbolicTemplateSeparationof concernsAspectsData-drivenData-orientedEvent-drivenIntentionalLiterateSubjectsTypes of programming languagesMachineAssemblyCompiledInterpretedLow-levelVery high-levelEsotericGenerationSecondFourth