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

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

[Octave-bug-tracker] [bug #43351] format + crashes the GUI


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #43351] format + crashes the GUI
Date: Sat, 04 Oct 2014 09:59:48 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23

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

On 4.1.0+ CLI I get no crash (but it looks intruiging):


octave:1> a=[1, 2; -3, 4]
a =

   1   2
  -3   4

octave:2> format +
octave:3> a
a =

++
 +

octave:4> a=[5, 6; -7, 8]
a =

++
 +

octave:5>


I get the same on 3.6.4-MSVC:

octave-3.6.4.exe:1> a=[1, 2; -3, 4]
a =

   1   2
  -3   4

octave-3.6.4.exe:2> format +
octave-3.6.4.exe:3> a
a =

++
 +

octave-3.6.4.exe:4> a=[5, 6; -7, 8]
a =

++
 +

octave-3.6.4.exe:5>


So + only prints for positive elements rather than non-zero elements, which
doesn't conform to "help format".

format '+ "+-."' isn't accepted, format + "abc" is but does nothing:

octave:3> format '+ "+-."'
error: format: unrecognized format state '+ "+-."'
octave:3> format + "abc"
octave:4> a
a =

   1   2  -3   4


Matlab r2014b prerel does:

>> a=[5, 6; -7, 8]
a =
     5     6
    -7     8
>> format +
>> a
a =
++
-+
>>


and Matlab's 'help format' says":

format +       The symbols +, - and blank are printed 
                     for positive, negative and zero elements.
                     Imaginary parts are ignored.


so it seems Octave's format command is also ML-incompatible (but I like
Octave's intended behavior better)


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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