Skip to content

Commit

Permalink
display: "loose" fix for newer versions of Octave
Browse files Browse the repository at this point in the history
Fixes #713.
  • Loading branch information
cbm755 committed Jan 11, 2017
1 parent e41406e commit deeca1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inst/@sym/display.m
Expand Up @@ -76,6 +76,10 @@ function display(x)
unicode_dec = false;
end
if (exist('OCTAVE_VERSION', 'builtin') && ...
compare_versions (OCTAVE_VERSION (), '4.3.0', '>='))
[fmt, spacing] = format();
loose = strcmp (spacing, 'loose');
elseif (exist('OCTAVE_VERSION', 'builtin') && ...
compare_versions (OCTAVE_VERSION (), '4.0.0', '>='))
% Octave 4.1 dropped (temporarily?) the get(0,...) approach
loose = eval('! __compactformat__ ()');
Expand Down

3 comments on commit deeca1c

@genuinelucifer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbm755 This doesn't seem to solve the problem for me. I get the following:

>> OCTAVE_VERSION ()

ans = 4.3.0+
>> [fmt, spacing] = format();

error: element number 1 undefined in return list
>>

@mtmiller
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Octave 4.3.0 is a moving target. If you built 4.3.0 months ago, you probably don't have this change yet. Not much that can be done about that, if you choose to use a development version.

@genuinelucifer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you built 4.3.0 months ago, you probably don't have this change yet.

Oh thanks! I'll rebuild then.

Please sign in to comment.