|Subject:||Re: case of arguments to format function|
|Date:||Fri, 11 Oct 2019 08:47:14 -0700|
On 10/10/2019 10:20 PM, address@hidden wrote:
There are lots of issues, all related to the fundamental design decision by The Mathworks to be case insensitive in the style of Windows, while Octave is UNIX-based and so respects the case of arguments.
First, there is no consistency even in documentation. The online documentation for format (https://www.mathworks.com/help/matlab/ref/format.html) uses lower case. Also in that vein, the code completion software built in to the IDE offers the suggestions in lower case after you type "format ". But, Andrew is correct that executing "help format" documents the arguments in upper case. What a mess!
By using "HEX" to indicate uppercase lettering, I was extending the interface we already have in Octave. I presumed that this would be the least surprising way to introduce the functionality to existing programmers. So, the first question to resolve is whether the existing case sensitive interface should be changed. In Octave, 'format short e" prints a lower case 'e' for the exponential as in 1e3. "format short E" prints an upper case 'E' for the exponential as in 1E3. This also holds for "g/G".
One argument against change is that this interface has been in place for years and no one seems to have complained about it. Although it might be correct that there is ambiguity, I'm inclined to let sleeping dogs lie. But, if someone wants to modify this, then I think the preferred solution should be an orthogonal option so that the base interface is fully Matlab compliant. In that case, I would argue for "format upper|lower" which would be akin to "format compact|loose" and can be specified independently of the display format.
|[Prev in Thread]||Current Thread||[Next in Thread]|