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 dml commands in abap?
Fallback class
What is the significance of technical settings (specified while creating a table in the data dictionary) ?
How can we handle table control in bdc? : abap bdc
When the get cursor command used in interactive lists?
In sap script how to print bar code in vertical manner
What are the different types of laws. What are they?
I created a field and entered the field type, when I double clicked the field type to define the domain; it is asking for an ACCESS KEY, I am not changing any SAP defined tables, working on a user defined table.
What are local objects? : abap data dictionary
What are conditional chain statement?
What are the steps in creating screen ?
What is the difference between leave transaction and call transaction?
What abap statement will trigger list generation?
Why do we use logical blocks in abap program?
What is the difference between commit-work and rollback-work tasks?