What Are Macros

Table of contents:

What Are Macros
What Are Macros

Video: What Are Macros

Video: What Are Macros
Video: Macros: Explained! Mind Over Munch Kickstart 2016 2024, November
Anonim

A macro is a specific object in the program, which is replaced with a new object during calculations. A new object is created by defining a macro based on its arguments, and then expressed in a standard way.

What are macros
What are macros

Instructions

Step 1

Writing macros is a rather difficult task compared to defining regular functions, because you need to know exactly what is calculated in the expansion stage and what in the second stage of its transformation. In many programs and software packages for office use, when processing macros in automatic mode, a sequence of actions defined for each of them is performed. An interface for recording new and overwriting existing ones is offered.

Step 2

Using macros, you can speed up a programmer's work with the selected application by an order of magnitude. In addition to the fact that the macro executes a certain list of commands built into the application, it also makes it possible to process external files, download and transfer the necessary files using the Internet, helps to read and change settings in the operating system as desired. Usually, the mode in which a person's actions are recorded in the form of a macro gives only unfinished code, which will subsequently need to be corrected. But even in this case, the macro significantly reduces the time required to perform the current operations.

Step 3

In programming, a macro is a special symbolic name that, when processed by the processor, is replaced with a specific sequence of instructions in a program. Each programming language has a specific syntax for calling macros.

Step 4

If the expression being defined is not convenient to enter manually, but you can create it using a program, then it is most convenient to do this using macros. They provide the ability to introduce into a certain programming language new forms of sentences that did not exist in this language before, but are suitable for a specific problem being solved.

Recommended: