Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

spedas/gui/utilities/

stringisnum.pro


Routines

top source stringIsNum

result = stringIsNum(str)

Function: stringIsNum Purpose: Determines if a given string is a number or not. Inputs: str : the string to be checked Output: Returns 1 if yes, or if no EXAMPLES: if stringIsNum(s) then print, strtrim(double(s),2) % Compiled module: STRINGISNUM. SPEDAS> print,stringisnum('hello') 0 SPEDAS> print,stringisnum('1.234') 1 SPEDAS> print,stringisnum('1.234e4') 1 SPEDAS> print,stringisnum('1B') 1 SPEDAS> print,stringisnum(' 1 ') 1 SPEDAS> print,stringisnum(' 1Hello ') 0 SPEDAS> print,stringisnum(' 1D ') 1 SPEDAS> print,stringisnum(' Hello ') 0 Notes: String must be only a numerical string and leading or trailing whitespace if true is to be returned. Strings that include other non-numerical characters will return false even if they have numerical sub-strings. $LastChangedBy: jimm $ $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $ $LastChangedRevision: 14326 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas/gui/utilities/stringisnum.pro $

Parameters

str

File attributes

Modification date: Thu Feb 13 16:41:46 2014
Lines: 14