[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


GET_COORDS Source code in get_coords.pro

GET_COORDS

Name
       GET_COORDS
Purpose
       Converts a string with angular coordinates  to floating point values.
Explanation
       Although called by ASTRO.PRO, this is a general purpose routine.
       The user may input as floating point or sexigesimal.  If user inputs
       calling procedure's job to convert hours to degrees if needed.
       Since the input string is parsed character-by-character, ANY character
       that is not a digit, minus sign or decimal point may be used as a
       delimiter, i.e. acceptable examples of user input are:
       1:03:55 -10:15:31
       1 3 55.0 -10 15 31
       1*3 55              -10abcd15efghij31
       1.065278  hello   -10.25861
Calling Sequence
       GET_COORDS, Coords, [ PromptString, NumVals, INSTRING =, /QUIET ]
Optional Input Parameters
       PromptString - A string to inform the user what data are to be entered
Keyword Parameters
       InString - a keyword that, if set, is assumed to already contain the
               input data string to be parsed.  If this keyword is set, then
               the user is not prompted for any input.
       /Quiet - if set the program won't printout any error messages, but bad
               input is still flagged by Coords=[-999,-999].
Output Parameters
       Coords - a 2 element floating array containing the coordinates.  The
               vector [-999,-999] is returned if there has been an error.
Optional Output
       NumVals - the number of separate values entered by the user:  2 if the
               user entered the coordinates as floating point numbers, 6 if
               the user entered the coordinates as sexigesimal numbers.  Some
               calling procedures might find this information useful (e.g., to
               to print some output in the same format as the user's input).
Revision History
       Written by Joel Parker, 5 MAR 90
       Included InString and Quiet keywords.  Cleaned up some of the code and
       comments.  JWmP,  16 Jun 94
*******************************************************************************
       Converted to IDL V5.0   W. Landsman   September 1997

Last modified by pro2html on 2001 April 26 at 03:11 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms ([email protected])
Updated automatically