All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Return value?

Definition 19.3 Primary & Middle School Computer Science · Chapter 19 — Functions

The instruction return ends the call and gives a value back to the place where the function was called: the return value. The call can then be used like that value, in a calculation or an assignment.

A function is like a machine: the arguments go in through the parameters, and the return value comes out.
A function is like a machine: the arguments go in through the parameters, and the return value comes out.
The journey of a call. The caller waits while largest3 runs; largest3 itself waits for each call to largest2. Each value comes back to the place where its call was written.
The journey of a call. The caller waits while largest3 runs; largest3 itself waits for each call to largest2. Each value comes back to the place where its call was written.
Read in context →