octave-maintainers
[Top][All Lists]
Advanced

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

Re: Some questions on the interval package


From: Oliver Heimlich
Subject: Re: Some questions on the interval package
Date: Tue, 15 Aug 2017 13:46:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 15.08.2017 12:36, Oliver Heimlich wrote:
> On 15.08.2017 11:16, Joel Dahne wrote:
>>
>> Oliver Heimlich writes:
>>
>>> On 16.06.2017 13:38, Joel Dahne wrote:
>>>>>> disp.m: When printing an array with more than 2 dimensions I have
>>>>>> followed the normal Octave style. It looks like
>>>>>>  ans(:,:,1) =
>>>>>>
>>>>>>    [0]   [0]
>>>>>>    [0]   [0]
>>>>> Two small observations:
>>>>>
>>>>>  1. The matrix label “ans(:,:,…)” should not be indented.
>>>>>  2. Before the matrix label you need an additional blank line (not
>>>>> before the first one). Remark: disp.m currently only supports “format
>>>>> loose”, where there are blank lines between matrix labels and matrices.
>>>>> Feel free to add support for “format compact”, but I don't know how to
>>>>> properly detect the current display mode.
>>>>>
>>>> I have fixed the observations you made! Have not added support for
>>>> "format compact" though, I don't know how to properly detect this
>>>> either.
>>>
>>> Given the recent hints on the mailing list regarding bug #46603, I have
>>> added support for “format compact” myself.  It has been a little bit
>>> complicated to come up with a solution that doesn't use internal
>>> functions, doesn't rely on deprecated features, and doesn't break old
>>> versions of Octave.
>>
>> It is indeed a bit complicated. I doesn't work for Octave version 4.2.1,
>> which uses __compactformat__ for this. I have attached a patch that
>> fixes it for me. But please double check that it works for you as well.
> 
> Thanks for the patch.  I'll make a private utility function from it.

Ok, done.  However, during my tests in Octave 3.8.2 I have found out
that “get (0, "FormatSpacing")” is broken and always returns "loose".

- In Octave < 4.0 there is no way to query that information correctly.
- In Octave 4.0.x we have __compactformat__ and get (0, "FormatSpacing")
- In Octave 4.2.x we have only __compactformat__
- In Octave > 4.3.x we have only [~, spacing] = format ()

Looking through the other BISTs on Octave 3.8.2 (see attachement), I
observe:

- several warnings because of automatic broadcasting (these warning are
disabled in Octave >= 4.0.0 by default)
- errors in the postpad and prepad functions
- a failing test for disp (see above)

Also, I can't use the doctest package on the manual anymore, because of
missing SKIP_IF expression support and the latest doctest package has a
dependency on Octave 4.0.0.

I guess it's time to drop support for Octave < 4.0.0 in the interval
package.

Oliver

Attachment: Octave 3.8.2 fntest.log
Description: Text Data


reply via email to

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