%N rtoaf %F $MIR/src/subs/string.for
%D Convert a real value into a string.
%P rjs
%: strings
%B
      character*(*) function rtoaf(value, form, nsf)

      real value
      integer form, nsf
  ---------------------------------------------------------------------
  Format a real value into a string using miriad's numbpg.

  Inputs:
    value         The value (must be real).
    form          How the number is formatted:
                    form = 0 - uses either decimal or
                               exponential notation
                    form = 1 - uses decimal notation
                    form = 2 - uses exponential notation
    nsf           Number of significant figures for output
                    (best range is between 1 and 6)
