What is The Difference between macro and procedure

Difference between macro and procedure:

Assembly language could be a common intermediate level artificial language that is employed for chip programming. This macro and procedure square measure 2 ideas in assembly by that standard programming is enforced. thus currently let’s perceive however macro and procedure square measure totally different from one another.

  1. Macro :

Macro could be a set of instruction and therefore the computer programmer will use it anyplace within the program by exploitation its name. it’s chiefly accustomed win standard programming. thus same set of directions may be used multiple times once ever needed by the assistance of macro. where macro’s symbol is employed, it’s replaced by the particular outlined directions throughout compilation thereby no job and come happens.

  1. Procedure :

Procedures are like macro, however they’re used for big set of instruction once macro is beneficial for tiny set of directions. It contains a collection of directions that performs a particular task. It contains 3 main components i.e Procedure name to spot the procedure, procedure body that contains set of directions, and douse statement that denotes come statement. not like macros, procedures follow call-return methodology thereby achieving true modularity.

Key difference:

The main distinction between a macro and a procedure is that the macro is employed for atiny low range of statements; but 10 statements, however procedure is employed for an oversized range of statements; quite 10 statements.

A microchip could be a pc processor that performs the tasks of a central process unit ( C.P.U. ) on one computer circuit (IC). It handles output devices and processes the directions keep in its memory and provides the output. These processors carry with it each combinatorial and consecutive digital circuits. additionally, programming language could be a artificial language that aids in programming the microprocessors. Overall, macro and procedure are 2 ideas in microchip programming.

Read More  What is the difference between Iron Man and Aluminium Man

A macro is employed for a little range of statements; typically fewer than 10 statements, whereas one procedure is employed for an oversized range of statements; typically quite 10 statements. Therefore, this can be the most distinction between a macro and a procedure.

Macro could be a sequence of directions written at intervals the macro definition to assist in standard programming. A procedure, on the opposite hand, could be a set of directions that performs a particular task and a software engineer will decision it repeatedly. therefore this can be the basic distinction between a macro and a procedure.

Leave a Comment