When a function is finished, the final statement in the funct can be something like
return x;
x is the value returned into the variable.
Example:
val = add(a, b); // add A and B
...
int add (int x, int y) // define the add function
{
int z;
z = x + y; // add the values
return z; // return the value of the addition
} val will contain the sum when the function is finished.
When you get to functions you will understand -- I hope
Last edited by WaltP; Aug 22nd, 2006 at 5:31 am.
Reputation Points: 3281
Solved Threads: 894
Posting Sage
Offline 7,747 posts
since May 2006