CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

Return

general format:

return <expression> ;

The return statement, when executed:

  • specifies that the result of an expression is to be returned as a result;
  • terminates execution of this function.

 

Note:

expression must be of the same type as the return type