Mercurial > hg > octave-lyh
changeset 8542:ef2dfe33e5b5
stmt.txi: unwind_protect doc fix
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2009 10:52:34 -0500 |
parents | d2cf983bdc9d |
children | fda06702bf71 |
files | doc/interpreter/stmt.txi |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/stmt.txi +++ b/doc/interpreter/stmt.txi @@ -782,7 +782,8 @@ This is useful to protect temporary changes to global variables from possible errors. For example, the following code will always restore the original value of the global variable @code{frobnositcate} -even if an error occurs while performing the indexing operation. +even if an error occurs in the first part of the @code{unwind_protect} +block. @example @group @@ -798,9 +799,10 @@ @noindent Without @code{unwind_protect}, the value of @var{frobnosticate} -would not be restored if an error occurs while performing the indexing -operation because evaluation would stop at the point of the error and -the statement to restore the value would not be executed. +would not be restored if an error occurs while evaluating the first part +of the @code{unwind_protect} block because evaluation would stop at the +point of the error and the statement to restore the value would not be +executed. @node The try Statement @section The @code{try} Statement