bugGNU Octave - Bugs: bug #29821, save('-mat', ... ) no longer saves...

 
 

bug #29821: save('-mat', ... ) no longer saves global variables

Submitted by:  chieh <chieh>
Submitted on:  Fri 07 May 2010 07:03:04 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jaroslav Hajek <highegg>
Originator Name: ChiehOpen/Closed: Closed
Release: 3.2.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 13 May 2010 06:39:39 PM UTC, comment #4:

It seems a reasonable idea for mark_global to create a variable if it doesn't exist. The opposite use case doesn't make sense to me. Why would you call 'global (varname)' if you didn't want access to varname immediately (assuming it exists) or didn't intend to do something with it later (in which case creating the variable now isn't a problem)?

Rik <rik5>
Project Administrator
Thu 13 May 2010 09:54:56 AM UTC, comment #3:

Fixed on savannah:
http://hg.savannah.gnu.org/hgweb/octave/rev/d406d91aa9c3

perhaps the functions
symbol_table::mark_global and symbol_table::mark_persistent should force a non-existing variable to be created? Is there some code relying on the opposite behavior?

Jaroslav Hajek <highegg>In charge of this item.
Sat 08 May 2010 02:36:47 AM UTC, comment #2:

I'm reopening this bug report because I think the proper behavior should be that if a variable is not already global, loading a file with a global variable should insert the variable into the global symbol table and also make it visible in the current scope. Octave currently inserts the value into the global symbol table, but it does not make it visible in the current scope.

John W. Eaton <jwe>
Project Administrator
Fri 07 May 2010 10:43:11 PM UTC, comment #1:

This works correctly in the development version (tested today 5/7/2010). Please try compiling a new version of Octave from sources.

Rik <rik5>
Project Administrator
Fri 07 May 2010 07:03:04 PM UTC, original submission:

If you run this code and try to load the test.mat file, the global variable is not saved at all.

global p;
p = 'dkfjdkfj'
s = 'this is s'

save('-binary','test.mat', 's', 'p')

chieh <chieh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by chieh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 May 2010 06:39:39 PM UTCrik5Open/ClosedOpen=>Closed
    Thu 13 May 2010 09:54:56 AM UTChigheggStatusConfirmed=>Fixed
      Assigned toNone=>highegg
    Sat 08 May 2010 02:36:47 AM UTCjweStatusInvalid=>Confirmed
      Open/ClosedClosed=>Open
    Fri 07 May 2010 10:43:11 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1