write an algorithm to outline the macro-expansion


Write an algorithm to outline the macro-expansion using macro-expansion counter.

The flow of control throughout macro expansion can be implemented by using a MEC that is macro- expansion counter. The basic outline of algorithm is as given below:

1.  MEC: = statement numbers of first statement Following the prototype statement;

2.  When statement pointed through MEC is not a MEND statement

(a)  If a model statement then  

(i)  Expand the statement. //By Expanding the MEC Command

(ii) MEC:=MEC+1;

(b) Else (i.e. a pre processor statement)   

(i)  MEC:=new value given in the statement; //New value of Preprocessor Statement

 3.  Exit from macro expansion.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: write an algorithm to outline the macro-expansion
Reference No:- TGS0276888

Expected delivery within 24 Hours