A macro or macroinstruction in computer science is a rule or pattern that specifies how a sequence of characters should be mapped to an alternate replacement output sequence characters according to a defined procedure. This is known as macro expansion.
Macros may be provided as part of a software application or as a part of a programming language where they are used to make tasks using the application less repetitive or allows a programmer to enable code reuse or even to design domain-specific languages.
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.