Loading ...
Sorry, an error occurred while loading the content.

14890Re: [Clip] isnumber function

Expand Messages
  • Bill Newman
    Mar 8, 2006
      Don - htmlfixit.com wrote:

      > Larry Hamilton wrote:
      > > loro wrote:
      > >
      > >>It's odd though. I also feel that what's not numeric should be
      > alpha. And
      > >>did we figure out why letters, mathematically, are zero? ;-o)
      > >>
      > >>Lotta
      > >
      > > Lotta,
      > >
      > > The IsNumber function is a True/False test. Either the selected
      > > information is a number or it is not. The Clip Help indicates that it
      > > returns 1 for a number and 0 if it is not. It must assume decimal
      > > numbers, there is no option to consider Hexadecimal. But octal and
      >
      > Hi Larry,
      >
      > Of the things we tested only the following were numbers (according to
      > isnumber):
      > a. an integer
      > b. any single letter of the alphabet (I consider this to be a bug)
      >
      > The following were not numbers:
      > a. any decimal number
      > b. any mixed characters other than a single alphabetic character
      > c. any number with commas in it for example 1,000
      >
      > So isnumber isn't isnumber, it is isinteger (with an odd twist of single
      > alphabetic characters tossed in).

      I think the problem is with the definition of IsNumber in Help. It
      takes an argument of "Value" and then refers to "Value" as the
      "specified text". A better definition might be:

      $IsNumber*("Str")$ *Returns 1 if Str contains only digits 0 through 9,
      and 0 if it does not.

      This explains what you observe. The fact that these numbers are
      integers is just a coincidence. This definition also corresponds more
      closely to the definition of IsAlpha.

      It also might have avoided this whole thread. :-)

      > Hopefully this can be fixed in version 4.96.
      >
      >
      > Fookes Software: http://www.fookes.us, http://www.fookes.com
      > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
    • Show all 22 messages in this topic