# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1299016927 21600 # Node ID 5b1654bc50122174f3fbcfe0a25f13cc83289e5c # Parent 981cd67960653adea296348f528aeaf8a3a2f3e6 Small FAQ fixes diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -18,7 +18,7 @@ in anticipation for the forthcoming 3.4 binary packages. Explain nested functions. Hint that classdef might happen in 3.5. Mention 3D patches in the OpenGL backend. Clarify Matlab-style - short-circuiting. + short-circuiting. Specify that Octave also onCleanup. 2010-02-28 Rik diff --git a/doc/faq/OctaveFAQ.texi b/doc/faq/OctaveFAQ.texi --- a/doc/faq/OctaveFAQ.texi +++ b/doc/faq/OctaveFAQ.texi @@ -536,7 +536,8 @@ the values of global variables that need to be temporarily changed. @sc{Matlab} can be made to do something similar with their -@code{OnCleanUp} function that was introduced in 2008a. +@code{OnCleanUp} function that was introduced in 2008a. Octave also has +@code{onCleanup} since version 3.4.0. @node Built-in ODE and DAE solvers @section Built-in ODE and DAE solvers @@ -987,7 +988,6 @@ comments are not supported within [] or @{@}. @item Mat-File format -@c How much of this is still true? There are some differences in the mat v5 file format accepted by Octave. @sc{Matlab} recently introduced the "-V7.3" save option which is an HDF5 format which is particularly useful for 64-bit platforms where the @@ -1218,7 +1218,9 @@ @code{try}/@code{catch} combined with @samp{rethrow (lasterror ())} in @sc{Matlab}, however rethrow and lasterror are only available in Octave 2.9.10 and later. @sc{Matlab} 2008a also introduced @code{OnCleanUp} -that is similar to @code{unwind_protect}. +that is similar to @code{unwind_protect}, except that the object created +by this function has to be explicitly cleared in order for the cleanup +code to run. Note that using @code{try}/@code{catch} combined with @samp{rethrow (lasterror ())} can not guarantee that global variables will be @@ -1264,7 +1266,7 @@ Typing Ctrl-C in the first case returns the user directly to the prompt, and the variable "a" is not reset to the saved value. In the second case the variable "a" is reset correctly. Therefore @sc{Matlab} -gives no save way of temporarily changing global variables. +gives no safe way of temporarily changing global variables. @item Indexing can be applied to all objects in Octave and not just