[Top][All Lists]

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

Re: Uppercase hex format?

From: Andrew Janke
Subject: Re: Uppercase hex format?
Date: Thu, 10 Oct 2019 22:20:19 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/10/19 8:16 PM, Mike Miller wrote:
On Thu, Oct 10, 2019 at 20:01:27 -0400, Nicholas Jankowski wrote:
seems like a fairly low risk expansion of capability. Is there any case
someone can think of where this would cause a conflict of some kind?  Will
it need to extend to any other I/o or math functions?

One risk is that Matlab's format command is case insensitive. The
command "format HEX" is identical to "format hex". Some day someone may
ask for Octave's format command to accept case insensitive arguments for

I generally think that having different options that only differ in case
is a bad interface. A better option might be something like "format
hexupper" or "format hex upper".

Oh, yeah: I didn't notice that this was activated by a case change in the "format hex" argument.

This is exacerbated by the fact that the Matlab documentation for "format" actually lists the argument options in upper case in the first place, so "HEX" instead of "hex" is what they say to do if you want to get the normal "format hex" behavior.

Definitely "format hexupper" or "format hexu" or "format hex upper", instead of "format hex" vs "format HEX".


reply via email to

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