% @(#)set_form.hlq	19.1 (ESO-IPG) 02/25/03 14:03:43 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      set_form.hlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, SET/FORMAT
%.PURPOSE    On-line help file for the command: SET/FORMAT
%.VERSION    1.0  19-JAN-1990 : Creation, KB
%.VERSION    1.1  06-APR-1992 : Update, KB
%----------------------------------------------------------------
\se
SECTION./FORM
\es\co
SET/FORMAT						15-SEP-1995  KB
\oc\su
SET/FORMAT [format_specs]
	set formats for replacement of Midas data
\us\pu
Purpose:  
          Set formats for replacement of Midas data, i.e. keywords,
          table elements, image pixels or descriptors.
\up\sy
Syntax: 
          SET/FORMAT [format_specs]
\ys\pa
          format_specs = formats for integer or real,double data and may be 
             of the form:
\\
             Ix for integer values (x in [1,9]) or
\\
             Jxy for integer values (x,y in [0,9]); this differs from the
             I-format in that it uses exactly xy spaces, i.e. no suppression
             of trailing zeroes is done, so this is the preferred format if
             you want to produce tabular output.
\\
             Fxx.yy or Exx.yy (Gxx.yy) for real, double values (x,y in [0,9]);
\\
             Txx.yy for real, double values (x,y in [0,9]); similar to the
             J-format for integer data, the T-format differs from the F-format
             only in that it uses exactly xy spaces, so it is the preferred 
             format for non-integer data if you want to produce tabular, well
             aligned output.
\\
             formats for real and double data are specified in the same
             format string (parameter), separated by a comma:
\\
             use one format without a comma to specify the same  format for 
             real and double data (as in 94NOV);
\\
             use `format,' with a comma as last char. to specify a format for
             real data only and use `,format' with comma as first char. to 
             specify a format for double data only;
\\
             if no format specification is given at all, the default formats
             I4 E15.5,E15.5 are used
\ap\sa
See also:
          Chapter 3 of MIDAS Users Guide, Volume A
\as\no
Note: 
          The formats are processed similar to the corresponding FORTRAN/C
          formats:
\\
          The I format prints also leading zeroes, and if the number
          does not fit into the format it is printed anyway
          (so no `***' output as in Fortran will occur).
\\
          One or two formats can be specified in one command line. If only one
          format is specified the other one is left unchanged. Thus, 
\\
          SET/FORMAT I6
\\
          only changes the format for integer data and leaves the formats for
          real and double data as they are.
\\
          With the F format insignificant trailing zeroes (after the `.')
          are cut off.
\\
          Please, note, that the formats are initialized to I4 E18.8,E18.8 for
          interactive usage and I4 E15.5,E15.5 for all procedure levels when
          starting Midas.
\\
          The format specifications are NOT global but linked to the procedure
          level. Thus, if you specify a format in procedure `abc.prg' and call
          another procedure `xyz.prg' from procedure `abc.prg', the formats
          used in `xyz.prg' will be the default formats - not the ones
          specified in `abc.prg' at the higher level.
\\
          Please, note, that these format specifications are not only used
          for displaying data (WRITE/OUT command) but also whenever symbol
          substitution (a data element enclosed in curly brackets) is done
          in a Midas procedure!
\\
          In the COMPUTE/KEYWORD (or immediate commands) the Midas function 
          M$VALUE should be used instead of curly brackets ${,}$ since this
          function passes the data in binary format (no ASCII representation
          is contructed like with the curly brackets.
\on\exs
Examples:
\ex
          SET/FORMAT I5 E12.6 
            Will yield: -01234 -1.234560E+02 -1.234570E+05
\\
            when using the Midas command:
\\
            write/out "{inputi(1)} {inputr(1)} {inputd(1)}"
\\
            because format E12.6 is used for real and double data as well
\\
            assuming that INPUTI(1) = -1234, INPUTR(1) = -123.456
            and INPUTD(1) = -123456.98765432
\xe\ex
          SET/FORMAT ,f30.10 
            Will yield: -01234 -1.23456E+02 -123456.98765432 
\\
            only the double format has been modified.
\xe\ex
          SET/FORMAT f8.1,
            Will yield: -01234 -123.5 -123456.98765432
\\
            only the real format has been modified.
\xe\ex
          SET/FORMAT f12.7,f30.10 i1
            Will yield: -1234 -123.4560013 -123456.98765432
\\
            Note, that the real format is "too large", so random digits are
            added to the output of INPUTR.
\\
            Also, the full integer value is displayed, so `I1' is a safe
            format for all integers (see the Note above).
\xe\ex
          SET/FORMAT
            Will yield: -1234 -1.23456E+02 -1.234569876543200E+0
\\
            the default formats.
\xe\ex
          COMPUTE/IMAGE guerrero = chiapas*({inputr(1)})
            Will result in the execution of the command:
\\
            COMPUTE/IMAGE guerrero = chiapas*(-1.23456E+02)
\xe \sxe
