~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/help/write_file.hlq

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% @(#)write_file.hlq    19.1 (ESO-IPG) 02/25/03 14:03:51
 
2
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
%.COPYRIGHT  (c)  1992 European Southern Observatory
 
4
%.IDENT      write_file.hlq
 
5
%.AUTHOR     KB, IPG/ESO
 
6
%.KEYWORDS   MIDAS, help files, WRITE/FILE
 
7
%.PURPOSE    On-line help file for the command: WRITE/FILE
 
8
%.VERSION    1.0  02-JUN-1992 : Creation, KB
 
9
%----------------------------------------------------------------
 
10
\se
 
11
SECTION./FILE
 
12
\es\co
 
13
WRITE/FILE                                            23-SEP-1992  KB
 
14
\oc\su
 
15
WRITE/FILE file_id charbuf 
 
16
        write into an ASCII file
 
17
\us\pu
 
18
Purpose:
 
19
          Write into an ASCII file which was opened before via the OPEN/FILE
 
20
          command.
 
21
\up\sy
 
22
Syntax:
 
23
          WRITE/FILE file_id charbuf 
 
24
          WRITE/FILE file_id,KEY charkey
 
25
\ys\pa
 
26
          file_id = file id which was returned by a previous OPEN/FILE command
 
27
\ap\pa
 
28
          charbuf = character buffer to be written into file
 
29
\ap\pa
 
30
          charkey = name of character keyword holding the buffer to be written
 
31
                into file (if file_id,KEY was given as 1. param);
 
32
\\
 
33
                The usual Midas syntax is used to write substrings of `charkey'
 
34
                to the file, i.e. `charkey(2:20) to write the string beginning
 
35
                at element 2 + ending at element 20 of `charkey'
 
36
\ap\sa
 
37
See also:
 
38
          OPEN/FILE, CLOSE/FILE, READ/FILE
 
39
\as\no
 
40
Note:
 
41
          If just the file_id is given, everything in the command line after
 
42
          the `file_id' is written to the file including spaces. If you just
 
43
          want to write a blank line, the spaces have to be enclosed by double
 
44
          quotes ("...").
 
45
\\
 
46
          If file_id,KEY is given, the contents of the char. keyword `charkey'
 
47
          are written to the file. Thus longer strings than 80 chars. can
 
48
          be written.
 
49
\\
 
50
          The actual no. of characters written into the file is stored as the
 
51
          2nd element of the integer keyword specified in the related
 
52
          OPEN/FILE command.
 
53
\on\exs
 
54
Examples:
 
55
\ex
 
56
          WRITE/FILE 8 Steglitz 
 
57
            Write the string `Steglitz' into ASCII file with file_id 8.
 
58
\xe\ex
 
59
          WRITE/FILE {fctr(1)} Lankwitz Lichterfelde
 
60
            Write string `Lankwitz Lichterfelde' into file with the file_id
 
61
            which was stored in integer keyword fctr(1) in a previous
 
62
            OPEN/FILE command.
 
63
\xe\ex
 
64
          WRITE/FILE 7 {p4(11:20)} 
 
65
            Write the contents of parameter P4 (beginning at element 11) into
 
66
            ASCII file with file_id 7.
 
67
\xe\ex
 
68
          WRITE/FILE 7,key p4(11:20) 
 
69
            Same as above. But note, that if a keyword holds a string longer
 
70
            than 80 chars, this form of the command must be used.
 
71
\xe\ex
 
72
          WRITE/FILE 7 "   "
 
73
            Write a blank line into ASCII file with file_id 7.
 
74
\xe\sxe