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:

    Poetry is the universal language which the heart holds with nature and itself. He who has a contempt for poetry, cannot have much respect for himself, or for anything else.
    William Hazlitt (1778–1830)

    Well of all things in the world, I don’t suppose anything can be so dreadful as a public wedding—my stars!—I should never be able to support it!
    Frances Burney (1752–1840)