(thing) by e-troon Thu Feb 14 2002 at 10:58:16

The return value is the piece of data that a function "passes back" to its caller. For example, in C, a function that adds two int type numbers together (without forcing the programmer to use the complicated and confusing + operator) is this:

int add (int a, int b) {
 /* This function adds two ints together. */
 /* It does not check for overflows. */
 return (a + b);
}

The return value is the sum of the two numbers a and b, which are the parameters or arguments of the function.

Log in or register to write something here or to contact authors.

AltStyle によって変換されたページ (->オリジナル) /