% @(#)write_comm.hlq	19.1 (ESO-IPG) 02/25/03 14:03:50 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      write_comm.hlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, WRITE/COMMANDS
%.PURPOSE    On-line help file for the command: WRITE/COMMANDS
%.VERSION    1.0  03-JUL-1990 : Creation, KB
%.VERSION    1.1  09-OCT-1991 : Update,, KB
%----------------------------------------------------------------
\se
SECTION./COMM
\es\co
WRITE/COMMANDS					09-OCT-1991  KB
\oc\su
WRITE/COMMANDS [procnam] [par1] [par2] ... [par8]
	save commands from command buffer + write into a procedure
\us\pu
Purpose: 
          Save commands from command buffer + write them into a procedure file
\up\sy
Syntax:
          WRITE/COMMANDS [procnam] [par1] [par2] ... [par8]
\ys\pa
          procnam = name of procedure file where the commands should be stored;
\\
               if omitted, the commands are stored in the file 'midtempXY.prg',
               where XY is the MIDAS unit, in the MIDAS working directory
               specified by the variable MID_WORK
\ap\pa
          par1 ... par8 = the parameters for the procedure,
\\
               each command line in the command buffer is scanned for an
               occurrence of par1, par2, ... 
\\
               if a complete (case sensitive + no abbreviations!) match is
               found, that substring will be replaced by {Pi}
\ap\sa
See also:
          READ/COMMANDS, CLEAR/BUFFER, SET/BUFFER
\\
          Chapter 3, MIDAS Users Guide, Volume A
\as\no
Note:  
          This command creates a new procedure quickly from the commands
          you just used interactively and can be edited later on with a
          normal text editor.
\on\exs
Examples:
\ex
          WRITE/COMM delicias
          If we assume the following MIDAS command buffer:
\\
          1   READ/KEY MODE
\\
          2   WRITE/KEY INPUTC BRAVO
\\
          3   READ/KEY INPUTC
\\
          we create the file delicias.prg, containing:
\\
          READ/KEY MODE
\\
          WRITE/KEY INPUTC BRAVO
\\
          READ/KEY INPUTC
\\
          in the current directory.
\xe\ex
          WRITE/COMM 
          Will create file midtemp34.prg (assuming you use MIDAS unit 34) in
          the directory specified via MID_WORK with the same contents.
\xe\ex
          WRITE/COMMANDS torreon ? BRAVO
          Will create procedure torreon.prg in current directory with:\\
          READ/KEY MODE\\
          WRITE/KEY INPUTC {P2}\\
          READ/KEY INPUTC
\xe \sxe
