Mercurial > octave
changeset 30686:bca7aebe3e2d stable
doc: Clarify documentation for "return" keyword (bug #61918).
* op-kw-docs: Add more documentation for "return" keyword.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 29 Jan 2022 16:22:39 -0800 |
parents | 92cda11fb171 |
children | 97989152bfbe 66456820ff59 |
files | libinterp/op-kw-docs |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/op-kw-docs Thu Jan 27 20:50:26 2022 +0100 +++ b/libinterp/op-kw-docs Sat Jan 29 16:22:39 2022 -0800 @@ -765,7 +765,14 @@ @c libinterp/parse-tree/oct-parse.yy -*- texinfo -*- @deftypefn {} {} return -Return from a function. +Return execution control immediately from a function or script to the calling +code. + +@code{return} is used to stop executing code and exit an m-file immediately +rather than continuing until the end of the function or script is reached. + +If the function or script was invoked directly, rather than from calling code +in an m-file, then Octave returns to the command line. @seealso{function} @end deftypefn spmd