Macro - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Macro.

Macro - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Macro.
This section contains 581 words
(approx. 2 pages at 300 words per page)
Buy the Macro Encyclopedia Article

A macro is a name or identifier that represents a (usually larger) combination of other names, identifiers, or symbols. Typically these represented identifiers will be a list of commands or program code. Macros have two similar but subtly different interpretations, and which one is used depends chiefly on the program interpreting it.

The simplest kind of macro is what might be called a "substitution macro." This type of macro is found in programming languages like C and C++, which support a "pre-processor" stage immediately before the compiler proper takes over to turn the computer program into a form the computer can understand. In these languages a macro is defined like this:

  • #define MY_MACRO printf("this is my macro!");

This line tells the pre-processor to replace every occurrence of the text "MY_MACRO" it finds in the code with the expression printf("this is my macro!"). This means...

(read more)

This section contains 581 words
(approx. 2 pages at 300 words per page)
Buy the Macro Encyclopedia Article
Copyrights
Gale
Macro from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.