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
How do you read files from the presentation server ? : abap bdc
How can we decide weather we can enhance the standard infotype or not ? : abap hr
What are the data types of the external layer?
What is the difference between semi-monthly and Bi-weekly payroll area
What are internal tables? : abap hr
What is sap abap tables?
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
Give 3 scenario of reporting due to which you require reporting help of ABAP consultant?
Differentiate database index and match code.
What are the basic components of dialog program?
What are the different types of internal table?
What is the difference between data elements and domains? : abap data dictionary
What are the organizational related infotypes? : abap hr
How do you get the number of lines in an internal table?
What is a sequence of event-triggered in report?