- NAME
TEN()
- PURPOSE
Converts a sexagesimal number or string to decimal.
- EXPLANATION
Inverse of the SIXTY() function.
- CALLING SEQUENCES
X = TEN( [ HOUR_OR_DEG, MIN, SEC ] )
X = TEN( HOUR_OR_DEG, MIN, SEC )
X = TEN( [ HOUR_OR_DEG, MIN ] )
X = TEN( HOUR_OR_DEG, MIN )
X = TEN( [ HOUR_OR_DEG ] ) <-- Trivial cases
X = TEN( HOUR_OR_DEG ) <--
or
= TEN(HRMNSC_STRING)
- INPUTS
HOUR_OR_DEG,MIN,SEC -- Scalars giving sexagesimal quantity in
in order from largest to smallest.
or
RMNSC_STRING - String giving sexagesmal quantity separated by
spaces or colons e.g. "10 23 34" or "-3:23:45.2"
Any negative values should begin with a minus sign.
- OUTPUTS
Function value returned = double real scalar, decimal equivalent of
input sexigesimal quantity. A minus sign on any nonzero element
of the input vector causes all the elements to be taken as
< 0.
- EXAMPLES
IDL> print,ten(0,-23,34)
--> -0.39277778
IDL> print,ten("-0:23:34")
--> -0.39277778
- PROCEDURE
Mostly involves checking arguments and setting the sign.
The procedure TENV can be used when dealing with a vector of
sexigesimal quantities.
- MODIFICATION HISTORY
Written by R. S. Hill, STX, 21 April 87
Modified to allow non-vector arguments. RSH, STX, 19-OCT-87
ecognize -0.0 W. Landsman/B. Stecklum Dec 2005
ork with string input W. Landsman Dec 2008