octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45969] Inner scopes of nested anonymous funct


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #45969] Inner scopes of nested anonymous function definitions are not saved.
Date: Sat, 18 Aug 2018 17:35:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #3, bug #45969 (project octave):

A refreshed changeset ('bug-45969-version2.cset') is attached. Octave
internals have changed since the first version, so there was more to do than
adapting to C++11-isms...

In octave_fcn_handle::save_ascii, ::save_binary, ::save_hdf5 I decided to
throw an error if the scope isn't valid, since AFAICS this is not supposed to
happen. Also, except in ::save_hdf5 (because it was too complex), I re-ordered
the code a bit so that no data is written until after the error checks, to
avoid writing incomplete data.

BTW, already in the previous code state, in case of errors in the ::save_...
functions, sometimes 'false' is returned and sometimes an error is thrown...
and the returned 'false' seems never to be checked at all when saving to
files. This is probably not ideal. As long as the returned 'false' is not
checked, it's probably better to throw errors...

Two of the constructors of tree_anon_scopes are currently not used. If
suitable, they can be used for something like

octave::tree_anon_scopes tas;
if (condition)
  tas = octave::tree_anon_scopes (argument);


The test file has been changed according to the way you (Rik) changed the
tests for bug #45972.

(file #44808)
    _______________________________________________________

Additional Item Attachment:

File name: bug-45969-version2.cset        Size:21 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45969>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]