Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Latest commit

 

History

History
7 lines (4 loc) · 727 Bytes

return_values.md

File metadata and controls

7 lines (4 loc) · 727 Bytes

Return value(s)

Many programming languages allow for returning a result from a function or subroutine. Often this happens using a return statement.

A return statement causes execution to leave the current subroutine and resume at the point in the code immediately after the instruction which called the subroutine, known as its return address, i.e. it resumes execution where the function was originally called. The return address is saved by the calling routine, today usually on the process's call stack or in a register. Return statements in many languages allow a function to specify a return value to be passed back to the code that called the function.