Opened 7 days ago
#426 new defect
PL/I I/O describes but does not implement the column(e) option
| Reported by: | Gary Dixon | Owned by: | Eric Swenson |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | General | Version: | MR12.6e |
| Keywords: | Cc: |
Description
AM83 Multics PL/I Reference Manual, pg 14-40 describes a control format option for use in print stream output: column(c)
'column' FORMAT ITEM
The 'column' format item has the forms:
column(e)
col(e)
Let n be the value of the expression e for a given execution; then the item
advances the stream pointer to the next character position that is in column n;
that is, to a character position that is the nth character position of a line.
This interpretation implies that if the stream pointer is beyond the nth column,
the operation is applied to the next line. If n exceeds the length of the line
(so the specified character position does not exist), the stream pointer is set
to the beginning of the next line.
Unfortunately, this column format option does not seem to be implemented. Here is a program example which tries to use this option.
foo: procedure;
dcl (item1, item2) char(10);
dcl sysprint file external;
item1 = "1st value";
item2 = "2nd value";
put skip(5) column(10) list(item1, item2);
put skip;
end foo;
The compiler issues the following two error statements.
PL/1 33f ERROR 288, SEVERITY 3 ON LINE 9 Unrecognizable option or attribute "column" in an I/O statement. It has been ignored. SOURCE: put skip(5) column(10) list(item1, item2); ERROR 1, SEVERITY 3 ON LINE 9 A syntax error has been found in this statement. Processing of the statement has been terminated. pl1: An error of severity 3 has occurred. pl1: Translation failed. foo.pl1
This indicates two actual problems.
- The column option is diagnosed as an unknown option, even though it is documented in AM83.
- The compiler rejects the otherwise proper put statement, even though it says it is ignoring the unknown option.
Removing the column option allows the program to compile and execute correctly.
foo: procedure;
dcl (item1, item2) char(10);
dcl sysprint file external;
item1 = "1st value";
item2 = "2nd value";
put skip(5) list(item1, item2);
put skip;
end foo;
r 15:50 0.059 4
pl1 foo -ot
PL/1 33f
r 15:50 0.102 15
foo
1st value 2nd value
r 15:50 0.023 0
Note:
See TracTickets
for help on using tickets.
