<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/STRING/

isnumber.pro

Determine if a text string is a valid number.

topisnumber

result = isnumber(txt0, x, help=help)

Return value

x = optionaly returned numeric value if valid. i = test flag: 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.

Parameters

txt0        in required

text string to test.

x        in required

Keywords

help       

Version history

Version

$Id: isnumber.pro 142 2006-07-21 12:47:49Z navarro $

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 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.

Statistics

McCabe cyclic 23
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.