What is the difference between macro and subroutine?
Answer Posted / nandy2
1. In a program it is often necessary to repeat the block of code many times.In this situation a macro facility may be useful . Macro instruction are singal line abbreviations for a block of instruction.
We can say that the function which is used in c,c++ and java is macro.
On the other hand subroutine is called whenever necessary i.e, the control of execution is transferred to the subroutine appears only once in the complete progaram.
We can say that the Header files attached in c and c++ and libraries are are subroutine.
2.Macro not utilize the service of stack.But the subroutine utilize the service of stack.
3. Subroutine requires less memory space for execution than that using macro.
4.Macro requires less time for execution than that using subroutine.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is example class
suppose i want to print sap script output in different printers at a time what are the settings i'll have to make?
what is the exact code that shoud be implimented in sap note
What are types of select statements?
In SAP Script,How to display a single field(like matnr)at the right end of the form.
Explain the table, which contain the details of all the name of the programs and forms?
What is is a match code? : abap data dictionary
What is “call mode”?
What is dynpro? what are its components ?
What is a subroutine?
Mention some important events in abap programming.
Explain what is the significance of hide?
Explain the components of selection table?
What are the data types of the external layer? : abap data dictionary
How to call other programs?