Menu

keywords-return

Will Pittenger

Used to return from a procedure. If the procedure is a get property accessor, operator, typecast, or a function, this is how you return a value from the procedure. For commands, complex statements, and set property accessors, a return is implied at the end of the procedure and is needed only to return early.

Commands, complex statements, and set property accessors

:::text
\return\

Functions, get property accessors, operators, and type casts

:::text
\return\ /SomeValue/

/SomeValue/ must be compatible with return type declared by the procedure.


Related

Wiki: Appendices-Deprecated keywords, operators, and delimiters
Wiki: Keywords
Wiki: Type casts
Wiki: keywords-function
Wiki: keywords-get

MongoDB Logo MongoDB