Hi-Tech Compiler: Macros

Status
Not open for further replies.
They are just a chunk of code, sometimes as short as one line which is given an alternative name. When the name is used in the program, the chunk of macro code is substituted for it. Often the macro can accept one or more parameters in it's declaration and when used those parameters are provided in the program are used instead.

Think of them as being like subroutines but each time the macro name is used in the program, the whole macro code is substituted. In a subroutine you would have one code called from several places.

Brian.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…