|The Hyper Programming Language|
|home||language reference||compiler||hyper on launchpad|
The return statement in Hyper is identical to that in C++ and Java. It exits from a procedure, and must return a result if the procedure has a return type.
There are two possible forms, one for procedures without a return type, and one for procedures with a return type. The first one is simply the keyword return, while the second one is return expression. The two forms have to be applied strict; you cannot use a simple return in a procedure that has a return type. A return statement cannot be used in a constructor.