[alt.os.multics is fairly inactive]
On 11/28/26 19:08, David Meyer wrote:
> IBM and Kednos PL/I compilers support the naming of problem/
> computational data value constants with the %declare and %replace
> preprocessor statements, respectively.
>
> However, I can't find anything like this in the Honeywell Multics PL/I
> manuals on bitsavers.org. Am I missing something, or does Multics PL/I
> have no way to indicate a constant data value other than with a literal?
>
DCL x FIXED BIN INIT(n) STATIC OPTIONS(CONSTANT);
The <options attribute> may specify the parenthesized keyword "constant" for items that are not entry values.
Specification of "constant" causes the variable to be allocated in the text section of the object segment.
The completed <attribute set> of a variable for which "options(constant)" has been
specified must contain the <internal attribute>, the <static attribute>, and either the <initial attribute> or the <structure attribute>. If the latter is true, all nonstructure members of the structure must contain the <initial attribute>.
Except for its allocation, the variable is treated semantically as
any other internal static variable. It is an error to change the value of a variable for which "options(constant)" has been specified during execution of a program.
This is what Iron Spring PL/I does for items declared with the "VALUE" attribute instead of "INITIAL". I'll have to add "OPTIONS(CONSTANT)". It doesn't have the same effect as %REPLACE or preprocessor %DECLARE, which do a simple text replacement.
Multics does have a PL/I preprocessor "pmac" which has %REPLACE and %SET, among other things.