2 Answers - Sort by: Date | Rating
A statement or a group statements(function) which are oftenly used in a program can be written in the form of a function whitch is nothing but a MACRO.
eg: #define pi 3.14
It is a single line macro.If you want to use 3.14 any where in the program u can simply use 'pi', then pre processor assigns 3.14 to the 'pi' while exicuting a program.
coming to IN LINE FUNCTION it is also a macro,but it has aditional properties like
1.if u write a big function as a inline function pre processor assumes it like a normal function (why because generaly inline functions or macros are used to reduse the switching time between the functions) automatically.That means while writing an inline function it is a request to the pre-processor but not an order.
eg: #define pi 3.14
It is a single line macro.If you want to use 3.14 any where in the program u can simply use 'pi', then pre processor assigns 3.14 to the 'pi' while exicuting a program.
coming to IN LINE FUNCTION it is also a macro,but it has aditional properties like
1.if u write a big function as a inline function pre processor assumes it like a normal function (why because generaly inline functions or macros are used to reduse the switching time between the functions) automatically.That means while writing an inline function it is a request to the pre-processor but not an order.
0
0
It's possible to define a macro to expand into the same code that an inline function would execute. But the macro would be limited to direct use in expressions--a macro cannot be called with apply, mapcar and so on. Also, it takes some work to convert an ordinary function into a macro. To convert it into an inline function is very easy; simply replace defun with defsubst. Since each argument of an inline function is evaluated exactly once, you needn't worry about how many times the body uses the arguments, as you do for macros.
0
1
- What Are The Organizational Dimensions Of Information?
- How Does Technology Affect Education For Preschoolers?
- What Is Order Of Importance?
- What Is The Letter Size In An OH?
- What Is The Features Of Water Fall Model?
- Why Use Information System?
- How Does Technology Affects Organizations?
- How Can Technology Help Us Learn?
- How Do Insects Aid Us In Technology And Industry?
- What Is Computing System?
- What Are The Roles Of Education In The Society?
- Could Find A Diagram Showing The Illustrations How To Use An Optical Mark Recognition?
- Which Of The Following Describes The Essential Components Of Information Technology?
- Write An Assembly Language Program To Find Out Average Of 10 8bit Number , Neglecting Fraction?
- How To Get System Information About Your Pc?
- What Is Coupling, Cohesion And Connascence?
- Who Was Yaqoob Kundi?and His Life Information
- What Is Information In Daily Life?
- What Current Technology Is Being Used?
- What Are The Impacts Of Information And Communications Technology On Education?
- How Do I Use Information And Communication Technology To Teach The Sector And Segment In Mathematics?
- How Can Information Technology Help Businesses To Be Innovative?
- List Two Properties Of Static Function?
- Describe Three Ways Your Daily Life Is Influenced By ICT System?
- What Is The Difference Between Inline Function And Preprocessor?
- What Is The Difference Between Header Files And A Macro?
- What Is The Difference Between Micro Economics And Macro Economics?
- What Is The Difference Between Micro And Macro Environment?
- What Is The Difference Between Micro Economics & Macro Economics Chart?
- What Is Difference Between Micro And Macro Economics With Examples?

New Comment - Comments are editable for 5 min.