Inline Function - Language Support

Language Support

C++, C99, and GNU C each have support for inline functions. Different compilers vary in how complex a function they can manage to inline. Mainstream C++ compilers like Microsoft Visual C++ and GCC support an option that lets the compilers automatically inline any suitable function, even those not marked as inline functions.

An inline function can be written in C99 or C++ like this:

inline int max(int a, int b) { return (a > b) ? a : b; }

Then, a statement such as the following:

a = max(x, y);

may be transformed into a more direct computation:

a = (x > y) ? x : y;

Read more about this topic:  Inline Function

Famous quotes containing the words language and/or support:

    ...I ... believe that words can help us move or keep us paralyzed, and that our choices of language and verbal tone have something—a great deal—to do with how we live our lives and whom we end up speaking with and hearing; and that we can deflect words, by trivialization, of course, but also by ritualized respect, or we can let them enter our souls and mix with the juices of our minds.
    Adrienne Rich (b. 1929)

    Any relation to the land, the habit of tilling it, or mining it, or even hunting on it, generates the feeling of patriotism. He who keeps shop on it, or he who merely uses it as a support to his desk and ledger, or to his manufactory, values it less.
    Ralph Waldo Emerson (1803–1882)