Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  Motley  >  MGH_STR_ISNUMBER

MGH_STR_ISNUMBER

MGH_STR_ISNUMBER
  ROUTINE NAME:
  MGH_STR_ISNUMBER

Purpose


  Determine whether a string represents a valid number.

Category


  Strings.

Calling Sequence


  result = MGH_STR_ISNUMBER(str)

Arguments


  str (input, string scalar or array)
    The string to be tested.

Keywords


  TYPE (input, numeric scalar)
    This keyword specifies the numeric data type to which the string
    is to be converted. It is passed to the FIX function to carry
    out the conversion. The default is 5 (double). For a list of IDL
    data types see the documentation for the SIZE function.
  VALUE (output, double)
    Set this keyword to a named variable to return the value. The
    data type is as specified by the TYPE keyword. The shape is the
    same as the input.

Return Value


  The function returns a byte scalar or array with the same
  shape as the input. The value is 1B if the string has been
  successfully converted to a number, otherwise 0B.
###########################################################################
  Copyright (c) 2014 NIWA:
  http://www.niwa.co.nz/
  Licensed under the MIT open source license:
  http://www.opensource.org/licenses/mit-license.php
###########################################################################

Modification History


  Mark Hadfield, 2001-05:
    Written, based on STRNUMBER in the IDL Astronomy Library.
  Mark Hadfield, 2002-01:
    Added the TYPE keyword to control the numeric type.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us