Sun 05 Oct 2014 10:32:43 AM UTC, comment #6:
Btw, it is possible to change plus_format_chars:
But the help says (as Philip already stated) 'plus CHARS', for example '+ "+-."'.
I think the current octave implementation (with two args) is plausible here and we should fix the documentation.
|
Sat 04 Oct 2014 10:27:21 AM UTC, comment #4:
In pr-output.cc the chars for "format plus" are defined as
(not as "+- " as matlab does but this isn't the problem here, only a ML incompatibility)
I think the problem is in ov-base-mat.cc:479 (default branch)
where "size_t pos = tmp.find_first_not_of (" ");" returns "string::npos" (not found) and then "os << tmp.substr (pos);" throws a out_of_range which isn't cached.
The same problem is also in ov-base-scalar.cc for "a=-1;format +"
|
Sat 04 Oct 2014 09:59:47 AM UTC, comment #3:
On 4.1.0+ CLI I get no crash (but it looks intruiging):
I get the same on 3.6.4-MSVC:
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:
Matlab r2014b prerel does:
and Matlab's 'help format' says":
so it seems Octave's format command is also ML-incompatible (but I like Octave's intended behavior better)
|
Sat 04 Oct 2014 09:36:33 AM UTC, comment #2:
Confirmed (hard crash) on Windows as well w. 3.8.0, 3.8.2-64bit, 3.9.0+ & 4.1.0+
It works fine with 3.6.4-MSVC
OS -> any, I'll leave 'Release' as it is entered
|