# HG changeset patch # User Rik # Date 1354122959 28800 # Node ID 18f8f298720565b1870fafe24b3aa9b7f056fe8d # Parent 806ea52af230726dd93a2a4c92970ecd343e4425# Parent ddc651eecf7a232c516d771838bbd66d420a502c maint: Merge stable to default to pick up fix for bug #37787. diff -r 806ea52af230 -r 18f8f2987205 doc/interpreter/dynamic.txi --- a/doc/interpreter/dynamic.txi Tue Nov 27 16:38:13 2012 -0800 +++ b/doc/interpreter/dynamic.txi Wed Nov 28 09:15:59 2012 -0800 @@ -1119,7 +1119,7 @@ allocate any memory that is needed by the foreign code, with either the @nospell{fortran_vec} method or the @w{@code{OCTAVE_LOCAL_BUFFER}} macro. -The Octave unwind_protect mechanism (@ref{The @code{unwind_protect} Statement}) +The Octave unwind_protect mechanism (@ref{The unwind_protect Statement}) can also be used in oct-files. In conjunction with the exception handling of Octave, it is important to enforce that certain code is run to allow variables, etc. to be restored even if an exception occurs. An diff -r 806ea52af230 -r 18f8f2987205 doc/interpreter/errors.txi --- a/doc/interpreter/errors.txi Tue Nov 27 16:38:13 2012 -0800 +++ b/doc/interpreter/errors.txi Wed Nov 28 09:15:59 2012 -0800 @@ -44,7 +44,7 @@ Since an error can occur during the evaluation of a program, it is very convenient to be able to detect that an error occurred, so that the error can be fixed. This is possible with the @code{try} statement -described in @ref{The @code{try} Statement}. +described in @ref{The try Statement}. @menu * Raising Errors:: @@ -136,7 +136,7 @@ @subsection Catching Errors When an error occurs, it can be detected and handled using the -@code{try} statement as described in @ref{The @code{try} Statement}. +@code{try} statement as described in @ref{The try Statement}. As an example, the following piece of code counts the number of errors that occurs during a @code{for} loop. diff -r 806ea52af230 -r 18f8f2987205 doc/interpreter/octave.texi --- a/doc/interpreter/octave.texi Tue Nov 27 16:38:13 2012 -0800 +++ b/doc/interpreter/octave.texi Wed Nov 28 09:15:59 2012 -0800 @@ -367,15 +367,15 @@ Statements -* The @code{if} Statement:: -* The @code{switch} Statement:: -* The @code{while} Statement:: -* The @code{do-until} Statement:: -* The @code{for} Statement:: -* The @code{break} Statement:: -* The @code{continue} Statement:: -* The @code{unwind_protect} Statement:: -* The @code{try} Statement:: +* The if Statement:: +* The switch Statement:: +* The while Statement:: +* The do-until Statement:: +* The for Statement:: +* The break Statement:: +* The continue Statement:: +* The unwind_protect Statement:: +* The try Statement:: * Continuation Lines:: The @code{switch} Statement diff -r 806ea52af230 -r 18f8f2987205 doc/interpreter/stmt.txi --- a/doc/interpreter/stmt.txi Tue Nov 27 16:38:13 2012 -0800 +++ b/doc/interpreter/stmt.txi Wed Nov 28 09:15:59 2012 -0800 @@ -46,20 +46,20 @@ @dfn{body} of a control statement. @menu -* The @code{if} Statement:: -* The @code{switch} Statement:: -* The @code{while} Statement:: -* The @code{do-until} Statement:: -* The @code{for} Statement:: -* The @code{break} Statement:: -* The @code{continue} Statement:: -* The @code{unwind_protect} Statement:: -* The @code{try} Statement:: +* The if Statement:: +* The switch Statement:: +* The while Statement:: +* The do-until Statement:: +* The for Statement:: +* The break Statement:: +* The continue Statement:: +* The unwind_protect Statement:: +* The try Statement:: * Continuation Lines:: @end menu -@node The @code{if} Statement -@section The @code{if} Statement +@node The if Statement +@section The if Statement @cindex @code{if} statement @cindex @code{else} statement @cindex @code{elseif} statement @@ -207,8 +207,8 @@ using the indentation to show how Octave groups the statements. @xref{Functions and Scripts}. -@node The @code{switch} Statement -@section The @code{switch} Statement +@node The switch Statement +@section The switch Statement @cindex @code{switch} statement @cindex @code{case} statement @cindex @code{otherwise} statement @@ -385,8 +385,8 @@ @end itemize -@node The @code{while} Statement -@section The @code{while} Statement +@node The while Statement +@section The while Statement @cindex @code{while} statement @cindex @code{endwhile} statement @cindex loop @@ -454,8 +454,8 @@ body; but using one makes the program clearer unless the body is very simple. -@node The @code{do-until} Statement -@section The @code{do-until} Statement +@node The do-until Statement +@section The do-until Statement @cindex @code{do-until} statement The @code{do-until} statement is similar to the @code{while} statement, @@ -501,8 +501,8 @@ body; but using one makes the program clearer unless the body is very simple. -@node The @code{for} Statement -@section The @code{for} Statement +@node The for Statement +@section The for Statement @cindex @code{for} statement @cindex @code{endfor} statement @@ -658,8 +658,8 @@ structure elements when the names of the elements do not need to be known. -@node The @code{break} Statement -@section The @code{break} Statement +@node The break Statement +@section The break Statement @cindex @code{break} statement The @code{break} statement jumps out of the innermost @code{for} or @@ -713,8 +713,8 @@ @end group @end example -@node The @code{continue} Statement -@section The @code{continue} Statement +@node The continue Statement +@section The continue Statement @cindex @code{continue} statement The @code{continue} statement, like @code{break}, is used only inside @@ -762,8 +762,8 @@ @end group @end example -@node The @code{unwind_protect} Statement -@section The @code{unwind_protect} Statement +@node The unwind_protect Statement +@section The unwind_protect Statement @cindex @code{unwind_protect} statement @cindex @code{unwind_protect_cleanup} @cindex @code{end_unwind_protect} @@ -813,8 +813,8 @@ point of the error and the statement to restore the value would not be executed. -@node The @code{try} Statement -@section The @code{try} Statement +@node The try Statement +@section The try Statement @cindex @code{try} statement @cindex @code{catch} @cindex @code{end_try_catch} diff -r 806ea52af230 -r 18f8f2987205 doc/interpreter/vectorize.txi --- a/doc/interpreter/vectorize.txi Tue Nov 27 16:38:13 2012 -0800 +++ b/doc/interpreter/vectorize.txi Wed Nov 28 09:15:59 2012 -0800 @@ -635,7 +635,7 @@ If you are using @code{eval} merely as an exception handling mechanism, and not because you need to execute some arbitrary text, use the @code{try} -statement instead. @xref{The @code{try} Statement}. +statement instead. @xref{The try Statement}. @item Use @code{ignore_function_time_stamp} when appropriate. If you are calling lots of functions, and none of them will need to change diff -r 806ea52af230 -r 18f8f2987205 libinterp/octave-value/ov-oncleanup.cc --- a/libinterp/octave-value/ov-oncleanup.cc Tue Nov 27 16:38:13 2012 -0800 +++ b/libinterp/octave-value/ov-oncleanup.cc Wed Nov 28 09:15:59 2012 -0800 @@ -192,7 +192,7 @@ elements) or returned from a function, @var{action} will be executed after\n\ clearing the last copy of the object. Note that if multiple local onCleanup\n\ variables are created, the order in which they are called is unspecified.\n\ -For similar functionality @xref{The @code{unwind_protect} Statement}.\n\ +For similar functionality @xref{The unwind_protect Statement}.\n\ @end deftypefn") { octave_value retval;