1 /* BEGIN fortran_io_consts.incl.pl1 - various constants for fortran I/O */
 2 
 3 /* Modified:
 4           24 Oct 81, MEP  added inquire_opr, deleted unused_9 (op_9)
 5           1 Oct 1981 - MEP internal file
 6           17 June 1981 - MEP for ansi77 i/o enhancements
 7 */
 8 declare
 9           (list_directed      initial("00"b),
10            unformatted        initial("01"b),
11            formatted          initial("10"b),
12            namelist           initial("11"b),
13 
14            sequential_access  initial("00"b),
15            direct_access      initial("01"b),
16            string_io          initial("10"b),
17            internal_file      initial("11"b) )bit(2) aligned internal static options(constant);
18 
19 dcl       (write_opr          initial(1),
20            old_endfile_opr    initial(2),
21            read_opr           initial(3),
22            rewind_opr         initial(4),
23            op_5               initial(5),
24            closefile_opr      initial(6),
25            close_opr          initial(7),
26            backspace_opr      initial(8),
27            inquire_opr        initial(9),
28            openfile_opr       initial(10),
29            open_opr           initial(11),
30            margin_opr         initial(12),
31            op_13              initial(13),
32            endfile_opr        initial(14)) fixed bin(4) int static options(constant);
33 
34 dcl       (stream_file        init("001"b),
35            record_file        init("010"b),
36            blocked_file       init("011"b),
37            binary_file        init("100"b) ) bit(3) aligned int static options(constant);
38 
39 dcl       (undefined          init(-1),
40            nonexistent        init(0),
41            unstructured       init(1),
42            sequential         init(2),
43            blocked            init(3),
44            indexed            init(4),
45            binary_stream      init(5) ) fixed bin int static options(constant);
46 
47 /* This is the list of fields of the fields_specified word.  It is used to check for duplication in the parse, and
48    is positionally importan for the code generator, fortran_io, and pl1_operators. */
49 
50 dcl       (status_field       init(1),
51            io_switch_field    init(2),
52            attach_desc_field  init(3),
53            filename_field     init(4),
54            mode_field         init(5),
55            access_field       init(6),
56            form_field         init(7),
57            recl_field         init (8),
58            binarystream_field init (9),
59            prompt_field       init (10),
60            carriage_field     init (11),
61            defer_field        init (12),
62            blank_field        init (13),
63            units_field        init (14),
64            fmt_field          init (15),
65            rec_field          init (16),
66            exist_field        init (17),
67            opened_field       init (18),
68            number_field       init (19),
69            named_field        init (20),
70            name_field         init (21),
71            sequential_field   init (22),
72            formatted_field    init (23),
73            unformatted_field  init (24),
74            nextrec_field      init (25),
75            direct_field       init (26) ) fixed bin int static options(constant);
76 
77 /* The following masks indicate the valid keywords and fields known to the i/o routines:
78           read: unit, fmt, iostat, err, end, rec.
79           write: unit, fmt, iostat, err, end.
80           open: unit, iostat, err, file, status, access, form, recl, blank, status, ioswitch,
81                 attach, mode, binarystream, prompt, carriage, defer.
82           close: unit, iostat, err, status.
83           inquire: unit _^Hx_^Ho_^Hr file, iostat, err, exist, opened, number, named, name, access, sequential, direct,
84                    form, formatted, unformatted, recl, nextrec, blank.
85  */
86 declare   (open_keyword_mask    init ("111111111111100000000000000000000000"b),
87            valid_open_keyword   init ("111111111111110000000000000000000000"b),
88            valid_read_keyword   init ("000000000000011100000000000000000000"b),
89            valid_write_keyword  init ("000000000000011000000000000000000000"b),
90            valid_close_keyword  init ("100000000000010000000000000000000000"b),
91            valid_inquire_keyword init("000100000000010011111111110000000000"b))
92                     bit (36) aligned internal static options (constant);
93 /* END   fortran_io_consts.incl.pl1 */