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:

    The problems of society will also be the problems of the predominant language of that society. It is the carrier of its perceptions, its attitudes, and its goals, for through it, the speakers absorb entrenched attitudes. The guilt of English then must be recognized and appreciated before its continued use can be advocated.
    Njabulo Ndebele (b. 1948)

    The confirmation of Clarence Thomas, one of the most conservative voices to be added to the [Supreme] Court in recent memory, carries a sobering message for the African- American community.... As he begins to make his mark upon the lives of African Americans, we must acknowledge that his successful nomination is due in no small measure to the support he received from black Americans.
    Kimberly Crenshaw (b. 1959)