Difference between macro and procedure

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 that macro and procedure square measure different from one another.

1. Macro :

A macro could be a set of instructions and therefore the computer programmer will use it anyplace within the program by exploiting its name. it’s chiefly accustomed win standard programming. thus the same set of directions may be used multiple times once ever needed with 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.

2. Procedure :

Procedures are like macro, however, they’re used for a big set of instructions once the macro is beneficial for a tiny set of directions. It contains a collection of directions that performs a particular task.

Also Read : Difference-between-hardness-and-harden-ability

It contains 3 main components i.e. Procedure name to spot the procedure, procedure body that contains a set of directions, and douse statement that denotes the 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 a tiny low range of statements; but 10 statements, however, the 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 them each combinatorial and consecutive digital circuit.

additionally, programming language could be an artificial language that aids in programming the microprocessors. Overall, macro and procedure are 2 ideas in microchip programming.

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.

A 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 decide it repeatedly. therefore this can be the basic distinction between a macro and a procedure.

Leave a Reply

Your email address will not be published. Required fields are marked *