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 am both a public and a private school boy myself, having always changed schools just as the class in English in the new school was taking up Silas Marner, with the result that it was the only book in the English language that I knew until I was eighteen—but, boy, did I know Silas Marner!
    Robert Benchley (1889–1945)

    The sceptics assert, though absurdly, that the origin of all religious worship was derived from the utility of inanimate objects, as the sun and moon, to the support and well-being of mankind.
    David Hume (1711–1776)