%N keyt %F $MIR/src/subs/tangle.for
%D Retrieve an angle or time from the command line.
%P rjs
%: user-input, command-line
%B
        subroutine keyt(key,value,fmt,def)

        implicit none
        character key*(*),fmt*(*)
        double precision value,def

  Get an angle or time from the command line arguments, and decode it.

  Input:
    key        Keyword associated with the angle.
    fmt        The format of the angle. Valid values are:
                 'dms' -- An angle given as dd:mm:ss.s or dd.ddd. The output
                          is in radians.
                 'hms' -- An angle given as hh:mm:ss.s or hh.hhh. The output
                          is in radians.
                 'dtime' -- Day fraction, either as hh:mm:ss.s, or hh.hhh.
                           The output is as a day fraction (i.e. number in
                           the range [0,1]).
                 'atime' -- A absolute time, either in the normal Miriad format
                          (yymmmdd.ddd or yymmmdd:hh:mm:ss.s), or as an
                          epoch (bxxxx or jxxx, where xxxx is a year. e.g.
                          j2000). The output is in Julian days.
                 'time' -- Either an absolute time or day fraction. The
                          output is in either Julian days, or as a day
                          fraction.
    def        The default value.
  Output:
    value      The value retrieved.
