bugGNU Octave - Bugs: bug #46000, FormatSpacing is missing

 
 

bug #46000: FormatSpacing is missing

Submitter:  Doug Stewart <dastew>
Submitted:  Fri 18 Sep 2015 11:12:37 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Wont Fix Assigned to:  None
Originator Name:  Doug Stewart Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 24 Sep 2015 04:19:01 PM UTC, comment #6: 

Are you sure properties Format and FormatSpacing still exist in ML r2014a and r2015b?
I tried (see bug #46034) in r2015b-prerelease and they are gone. Michael Godfrey saw the same in r2015a.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 23 Sep 2015 01:42:09 PM UTC, comment #5: 

Both properties "Format" and "FormatSpacing" are clearly deprecated in MATLAB, see:

https://www.mathworks.com/help/matlab/release-notes.html?searchHighlight=formatspacing#R2014b

under the point "Properties and syntaxes being removed or changed". But I can confirm, that in 2014b and 2015b these properties still exist. I don't recommend to get Octave users used to these properties, if they might be dropped off MATLAB in the nearer future.

A dirty hack to replace get(0, "format") was checking the display size of PI.


octave:1> format short, int32(length(disp(pi)))
ans = 8
octave:2> format long, int32(length(disp(pi)))
ans = 18
octave:3> format short e, int32(length(disp(pi)))
ans = 14
octave:4> format long e, int32(length(disp(pi)))
ans = 24


Kai Torben Ohlhus <siko1056>
Group Member
Wed 23 Sep 2015 12:16:33 PM UTC, comment #4: 

See my post in bug #46034

Philip Nienhuis <philipnienhuis>
Group Member
Tue 22 Sep 2015 11:22:11 AM UTC, comment #3: 

Are you sure Matlab hasn't deprecated or removed "Format" and "FormatSpacing"?  The list of root object properties no longer includes it (http://www.mathworks.com/help/matlab/ref/root-properties.html).

Rik <rik5>
Group administrator
Tue 22 Sep 2015 10:02:02 AM UTC, comment #2: 

Reopening, this is a Matlab compatibility issue, the "Format" and "FormatSpacing" root properties are the official way to query the current format in Matlab:

https://www.mathworks.com/help/matlab/ref/format.html

Mike Miller <mtmiller>
Group Member
Sat 19 Sep 2015 09:13:48 PM UTC, comment #1: 

I went ahead and submitted a fix for this to the symbolic package project: https://github.com/cbm755/octsympy/pull/264

If you apply that patch, the symbolic package should work with 4.1, it does for me.

The patch can be downloaded from https://github.com/mtmiller/octsympy/commit/dcbcfb867ced3521ae9f0b9fecdbcdf8014c744d.patch for those unfamiliar with github.

I think that's the better place to fix this, this root property was never used by any other packages.

Mike Miller <mtmiller>
Group Member
Fri 18 Sep 2015 11:12:37 PM UTC, original submission:  

Symbolic pkg. has stopped working with default, and the problem has been traced to the following:

the error is in @sym/diplay.m, when it tries to use:

get(0,'FormatSpacing')

 See this recent change that removed this property:

http://hg.savannah.gnu.org/hgweb/octave/rev/564e59f75ef8


@Rik   I reverted that change on my local copy and now symbolic works again.

 


Doug Stewart <dastew>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dastew (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-23 siko1056 StatusConfirmed Wont Fix
        Open/ClosedOpen Closed
    2015-09-23 rik5 Dependencies- bugs #46034 is dependent
    2015-09-22 mtmiller CategoryNone Interpreter
        StatusWont Fix Confirmed
        Open/ClosedClosed Open
    2015-09-19 mtmiller StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code