Function: USERANGLE Purpose: User input interface routine for angular reals Category: user io Author: Do Kester Use: integer USERANGLE( value, O doubleprecision nmax, I integer default, I integer key, I character*(*) mess ) I character*(*) userangle number of items entered value result nmax maximum number of values default default level key prompt string mess accompanying message Description: The string(s) presented to KEY may be written in two formats 1. It can consist of one string containing 3 (or less) numbers separated by a delimiter from the set 'dDhHmMsSrR'. They mean the obvious: the degrees (or hours) are separated by a 'd' ('h') from the minutes which in turn are separated by an 'm' from the seconds. The seconds may be closed by an 's'. Minutes and seconds may alternatively be indicated by a single quote (') and a double quote (") -not 2 single quotes-. An 'r' indicates radians. 2. The second format consists of 3 or less strings, each a valid fortran real, closed with a unit indicator: Hour, Degree or Radian. The unit indicator is obligatory for an interpretation as degrees(hours) minutes and seconds. When none is given each string is interpreted as an individual value (in degrees). The strings are separated from each other by one or more blanks (more blanks are equivalent to one) or by one of the set ',;:' (more of these separate empty strings which result in a zero on that position.) All numbers must comply to the fortran reals. If the number is to be negative, the first character should be a '-'. Some examples: format 1 format 2 result 120d30m15s 120 30 15 deg 120 + 30/60. + 15/3600. -60d12.5m -60:12.5 d -( 60 + 12.5/60. ) 12h30 12;30 hours ( 12 + 30/60. ) * 15 12h30s 12;;30 h ( 12 + + 30/3600. ) * 15 12.3 12.3 12.3 4r 4 Radian 4 * 180 / pi Externals: USERTEXT NELC References: former name in Geisha: gucala Update: 890109 Timo Prusti, unification of versions 880322 Do Kester 28 Nov 1990 Do Kester, gipsy code 19 Nov 1991 Pjotr Roelfsema, changed use of EXACT default 07 Jan 1992 DK, better conformance to default levels 03 Sep 1992 DK, initialization of input string to blanks and ios initialized to 0