Difference between revisions of "Return"
Jump to navigation
Jump to search
(moved Return to Return (law)) |
|||
| Line 1: | Line 1: | ||
| − | + | The '''return''' statement tells a function, subroutine or method to stop running and "return" control to its caller. In Java and most other languages, no other lines of programming code may follow a return statement, since they could not possibly be executed. The typical compiler therefore labels this a coding error. But in PHP it is allowed.<!-- I'm not sure about JavaScript. --> | |
| + | |||
| + | [[category:Computer Programming]] | ||
Revision as of 19:23, July 18, 2011
The return statement tells a function, subroutine or method to stop running and "return" control to its caller. In Java and most other languages, no other lines of programming code may follow a return statement, since they could not possibly be executed. The typical compiler therefore labels this a coding error. But in PHP it is allowed.