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 are the uses of the information in the data dictionary? : abap data dictionary
There is a delivery that is being created through the ABAP code and in the middle it says delivery created but someone is modifying , how would you rectify this issue
Difference between domain and data element? What are aggregate object?
Define subtype ? : abap hr
What are the advantages and disadvantages of ABAP query tool?
A field containing currency amounts (data type curr) must be assigned to a reference table and a reference field. Explain.? : abap data dictionary
The max number of calling modes stacked at one time is?
If I forgot some command in sap script e.g.: Suppress zero display – how to do find it?
What are the attributes of the data? : abap data dictionary
What are the types of table fields in the sap abap?
What is the meaning of abap editor integrated with abap data dictionary? : abap data dictionary
What is view? Different types of view.
What are the buffering options in abap?
Explain about drill down report?
How do you process errors in session method ? : abap bdc