Menu

keywords-returns

Will Pittenger

Used to declare a return type for a function. Return types have ref, const, readonly, or byvalue explicitly applied to them. Return types can be type aliases. The returns clause can be before or after the throws clause if both are present. For more on functions, see the section [Functions].

(\public\ | \protected\ | \private\) [(\virtual\ | \abstract\ | \final\)] [\const\] [\static\] \function\ /identifier/ /DeclarationSequence/
    {\returns\ /TypeDescriptor/ |
    [\throws\ /ExceptionList/]}
  ' Run some code
  \return\ /ReturnValue/

For more on what /DeclarationSequence/ can be, see Declaration sequences.


Related

Wiki: Functions
Wiki: Keywords
Wiki: keywords-byvalue
Wiki: keywords-const
Wiki: keywords-function
Wiki: keywords-readonly
Wiki: keywords-ref
Wiki: keywords-throws