% @(#)defineloca.mlq	1.1 (ESO-IPG) 7/24/91 14:54:54 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      defineloca.mlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, DEFINE/LOCAL
%.PURPOSE    On-line help file for the Midas language command: DEFINE/LOCAL
%.VERSION    1.0  24-JUL-1991 : Creation, KB
%.VERSION    1.1  22-FEB-1993 : Update, KB
%----------------------------------------------------------------
\rightpage
\se
SECTION./LOCA
\es\co
DEFINE/LOCAL						22-FEB-1993  KB
\oc\su
DEFINE/LOCAL key_def data [A] [lower_levels_flag]
	define and initialize a local key
\us\pu
Purpose:   
          Define and initialize a local keyword in a Midas procedure.
\up\sy
Syntax:
          DEFINE/LOCAL key_def data [A] [lower_levels_flag]
\ys\pa
          key_def = keyname/keytype/first_elem/no_elem
\ap\pa
          data  = data string
\ap\pa
          A = optional all_flag, if given all elements of the keyword are set
              to given data
\ap\pa
          lower_levels_flag = optional flag, if set to `+lower_levels', this
              local keyword is also defined at lower levels, i.e. in all
              procedures called from the one where the keyword is defined;
\\
              by default local keywords are only known at the procedure level
              in which the procedure defining them is running
\ap\no
Note:  
          The names of local keywords have to be different from the names of
          the initial systems (global) keywords which are specified in the
          ASCII file `syskeys.dat' and created when starting MIDAS.
\\
          For all other keywords, local keywords take precedence over global
          keywords in case of name conflicts (i.e. same name).
\\
          When the procedure terminates, all keywords created via DEFINE/LOCAL
          in this procedure are deleted. This feature leads to problems if you
          want to look at the contents of local keywords, after the procedure
          has finished...
\\
          You have to execute the procedure in `debug' mode (i.e. after having
          issued the command DEBUG/PROC) to be able to read the contents
          of local keywords.
\on\sa
See also:
          WRITE/KEYWORD, READ/KEYWORD, DEBUG/PROC
\as\exs
Examples:
\ex
          DEFINE/LOCAL mykey/I/1/3 -2,-8,256
           Create an integer local keyword of 3 elements and initialize its
           elements to: -2, -8 and 256.
\xe \ex
          DEFINE/LOCAL YOURKEY/D/1/30 1.d0 all
           Create a double precision local keyword of 30 elements and set
           all elements to 1.0 .
\xe \ex
          DEFINE/LOCAL inherit/c/1/10 "I know you" ? +lower_levels
           Create a character local keyword of 10 elements (bytes) and make
           it known to all procedures called from the defining procedure.
\xe \sxe
