Name
is_float -- check whether the argument is floating point number
Purpose
Check whether the arguments are valid flaoting point numbers
by doing a pattern match.
Usage
is_float [arg1 arg2 ... argN]
Arguments
arg1, etc: strings to be evaluated as possible numbers
Output
Each valid float is printed on STDOUT
Restrictions
A leading "+" will invalidate the string; e.g., "+1.00" is not
considered a valid number.
Exit values
0 = normal completion; all values are floats
1 = non-floats detected
Type
Perl5 script
Example
1) check whether a variable is a floating point value:
set a = 1.234
is_float $a
echo $status ( returns 0 ==> good)
See Also
The shell script is_float
DEIMOS script index
Go to:
DEIMOS Home Page -
Instruments Home Page -
Keck Home Page
Last modified: Wed Jun 9 16:30:30 2004