diff libinterp/parse-tree/pt-arg-list.cc @ 22156:187b6727c75e

build doc-cache without running Octave (bug #48508) * mk_doc_cache.m: Delete. * doc/interpreter/mk-doc-cache.pl: New script, replaces mk_doc_cache.m. * doc/interpreter/module.mk: Update file lists. (doc/interpreter/doc-cache): Use perl script to generate to aid in cross builds. * libinterp/op-kw-docs: New file. * libinterp/module.mk: Update. (libinterp/DOCSTRINGS): Also include info from op-kw-docs. * pt-arg-list.cc (Fend): Include info in docstring about use of end as a language keyword. (install-built-in-docstrings): Depend on libinterp/DOCSTRINGS. Simplify rule now that libinterp/DOCSTRINGS is always generated in the build directory.
author John W. Eaton <jwe@octave.org>
date Thu, 21 Jul 2016 18:11:06 -0400
parents 9203833cab7d
children bac0d6f07a3e
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-arg-list.cc	Sat Jul 16 14:03:34 2016 +1000
+++ b/libinterp/parse-tree/pt-arg-list.cc	Thu Jul 21 18:11:06 2016 -0400
@@ -126,11 +126,16 @@
 static int index_position = 0;
 static int num_indices = 0;
 
+// END is documented in op-kw-docs.
 DEFCONSTFUN (end, , ,
              doc: /* -*- texinfo -*-
 @deftypefn {} {} end
-The magic index @qcode{"end"} refers to the last valid entry in an
-indexing operation.
+Last element of an array or the end of any @code{for}, @code{parfor},
+@code{if}, @code{do}, @code{while}, @code{function}, @code{switch},
+@code{try}, or @code{unwind_protect} block.
+
+As an index of an array, the magic index @qcode{"end"} refers to the
+last valid entry in an indexing operation.
 
 Example:
 
@@ -146,6 +151,7 @@
     @result{} 6
 @end group
 @end example
+@seealso{for, parfor, if, do, while, function, switch, try, unwind_protect}
 @end deftypefn */)
 {
   octave_value retval;