% @(#)definepara.mlq	19.1 (ESO-IPG) 02/25/03 14:03:13
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      definepara.mlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, DEFINE/PARAMETER
%.PURPOSE    On-line help file for the Midas language command: DEFINE/PARAMETER
%.VERSION    1.0  24-JUL-1991 : Creation, KB
%----------------------------------------------------------------
\se
SECTION./PARA
\es\co
DEFINE/PARAMETER					24-JUL-1991  KB
\oc\su
DEFINE/PARAMETER Pi [default] [typ_spec] [prompt_str] [lo_lim,hi_lim]
	define default, type and valid interval for parameter i
\us\pu
Purpose: 
          Define default, type and valid interval for parameter i.
\up\sy
Syntax:
          DEFINE/PARAMETER Pi [default] [typ_spec] [prompt_str] [lo_lim,hi_lim]
\ys\pa
          Pi = P1, P2, ..., or P8
\ap\pa
          default = default value for Pi; defaulted to ?
\ap\pa
          typ_spec = type/option of Pi
\\
             valid types are: I(mage), T(able), F(it), N(umber) or ?, if no
             type checking should be done; defaulted to ?
\\
             option = C or A;
\\
             C - check type of parameter Pi and continue, only update
             keyword PARSTAT(i)
\\
             A - check type of parameter Pi and abort if not equal to
             required type
\\
             Element i of the (system) keyword PARSTAT is set to 1 or 0, if
             parameter Pi is of the required type or not.
\\
             If type = ? the element PARSTAT(i) will always be set to 1.
\\
             If the option is A (for ABORT), which is the default, the
             procedure is aborted.
\\
             Besides type checking, also name translation is done, i.e. if 
             Pi = \#15 or \&g , then Pi will obtain the relevant "real"
             frame name in execution of the command.
\ap\pa
          prompt_str = prompt string;
\\ 
             (has to be enclosed in " " if it contains blanks),
\\
             if default = ?, i.e. no default defined, the user is prompted 
             for the parameter using this prompt string
\\
             if default = +, then also no default is defined, but the user is
             not prompted for input;
\\
             thus one can check inside the procedure if this parameter has
             been given or not (if p1(1:1) .eq. "+" ...);
\\
             defaulted to ?
\ap\pa
          lo_lim,hi_lim = optional low, high limit of valid interval for
             numeric parameter (only valid for a single, numeric parameter);
\\
             low_lim may be set to "<" to indicate neg. infinity,
\\
             hi_lim may be set to ">" to indicate pos. infinity
\ap\no
Note:   
          The type checking is only done on the first character of a parameter.
          So, if you have a numerical parameter, 4.3 as well as 4.a will pass
          the test, whereas a.4 will fail.
\on\exs
Examples:
\ex
          DEFINE/PARAM P3 lola I
            Parameter P3 should contain an image name and is defaulted to lola.
            The procedure aborts, if not a valid image name
\xe\ex
          DEFINE/PARAM P3 lola I/C
            Parameter P3 should contain an image name and is defaulted to lola.
            But the procedure continues also, if e.g. a number is entered.
            In that case PARSTAT(3) is set to 0 (may be tested in the 
            procedure).
\xe\ex
          DEFINE/PARAM P1 ? N "Enter number:" 0,>
            P1 should hold a non-negative number. If parameter P1 is not
            entered, the user is prompted for it (because `default' = ?).
\xe \sxe
