Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Hi-Tech Compiler: Macros

Status
Not open for further replies.

shahram642005

Newbie level 6
Joined
Nov 19, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
73
hi, I wanna know what are Macros? why and how are they used?
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top