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
Is it possible to run host command from SAP environment? How do you run?
how to use table control?if suppose i have 6 records and i want more 4 records in sequence.How to handle this scenario?
Explain the types of bdc's?
What are differences between at selection-screen and at selection-screen output?
Explain the table, which contain the details of all the name of the programs and forms?
Setting up a BDC program where you find information from?
any one can tell me which is the tables can store in ddic plese dont say db02l,please give me different ways of resideing the tables ?
In sap script how to print bar code in vertical manner
Explain the use of insert and append statement in sap abap?
What is going life actually? What is the role of a functional consultant in it? : sap abap hr
What is pnp-sw-found ? : abap hr
What do you understand by work area and internal tables in abap? Why do we use it?
What are internal tables? How to use a specific number occurs statement?
identify valid statement when coding a field exit ? a) submit RSCA101X b)MESSAGE E101 C)MESSAGE I101 d)BREASK-POINT
How did you transfer legacy data in the mid of the financial year (us) to the sap system? : sap abap hr