ISNUMBER Name
ISNUMBER Purpose
Determine if a text string is a valid number.
Category
Calling Sequence
i = isnumber(txt, [x]) Inputs
txt = text string to test. in
Keyword Parameters
Outputs
x = optionaly returned numeric value if valid. out
i = test flag: out
0: not a number.
1: txt is a long integer.
2: txt is a float.
-1: first word of txt is a long integer.
-2: first word of txt is a float.
Common Blocks
Notes
Modification History
R. Sterner. 15 Oct, 1986.
Johns Hopkins Applied Physics Lab.
R. Sterner, 12 Mar, 1990 --- upgraded.
Richard Garrett, 14 June, 1992 --- fixed bug in returned float value.
R. Sterner, 1999 Nov 30 --- Fixed a bug found by Kristian Kjaer, Denmark
R. Sterner, 2006 Sep 07 --- Now works for text arrays.
R. Sterner, 2010 Apr 29 --- Converted arrays from () to [].
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.