% @(#)write_file.hlq	19.1 (ESO-IPG) 02/25/03 14:03:51
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1992 European Southern Observatory
%.IDENT      write_file.hlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, WRITE/FILE
%.PURPOSE    On-line help file for the command: WRITE/FILE
%.VERSION    1.0  02-JUN-1992 : Creation, KB
%----------------------------------------------------------------
\se
SECTION./FILE
\es\co
WRITE/FILE                                            23-SEP-1992  KB
\oc\su
WRITE/FILE file_id charbuf 
        write into an ASCII file
\us\pu
Purpose:
          Write into an ASCII file which was opened before via the OPEN/FILE
          command.
\up\sy
Syntax:
          WRITE/FILE file_id charbuf 
          WRITE/FILE file_id,KEY charkey
\ys\pa
          file_id = file id which was returned by a previous OPEN/FILE command
\ap\pa
          charbuf = character buffer to be written into file
\ap\pa
          charkey = name of character keyword holding the buffer to be written
                into file (if file_id,KEY was given as 1. param);
\\
                The usual Midas syntax is used to write substrings of `charkey'
                to the file, i.e. `charkey(2:20) to write the string beginning
                at element 2 + ending at element 20 of `charkey'
\ap\sa
See also:
          OPEN/FILE, CLOSE/FILE, READ/FILE
\as\no
Note:
          If just the file_id is given, everything in the command line after
          the `file_id' is written to the file including spaces. If you just
          want to write a blank line, the spaces have to be enclosed by double
          quotes ("...").
\\
          If file_id,KEY is given, the contents of the char. keyword `charkey'
          are written to the file. Thus longer strings than 80 chars. can
          be written.
\\
          The actual no. of characters written into the file is stored as the
          2nd element of the integer keyword specified in the related
          OPEN/FILE command.
\on\exs
Examples:
\ex
          WRITE/FILE 8 Steglitz 
            Write the string `Steglitz' into ASCII file with file_id 8.
\xe\ex
          WRITE/FILE {fctr(1)} Lankwitz Lichterfelde
            Write string `Lankwitz Lichterfelde' into file with the file_id
            which was stored in integer keyword fctr(1) in a previous
            OPEN/FILE command.
\xe\ex
          WRITE/FILE 7 {p4(11:20)} 
            Write the contents of parameter P4 (beginning at element 11) into
            ASCII file with file_id 7.
\xe\ex
          WRITE/FILE 7,key p4(11:20) 
            Same as above. But note, that if a keyword holds a string longer
            than 80 chars, this form of the command must be used.
\xe\ex
          WRITE/FILE 7 "   "
            Write a blank line into ASCII file with file_id 7.
\xe\sxe
