Attribute Specifications

<attribute specifications>

  ┌◄────────────────────── , ─────────────────────┐
──┴─┬─<arithmetic attribute specification>──────┬─┴────────────────────►
    ├─<Boolean attribute specification>─────────┤
    ├─<pointer attribute specification>─────────┤
    └─<translate-table attribute specification>─┘
►─┬──────────────────────────────────────┬─────────────────────────────┤
  └─ ( ──<attribute parameter list>── ) ─┘

<arithmetic attribute specification>

──<arithmetic-valued file attribute name>── = ─────────────────────────►
►─┬─<arithmetic expression>─────────┬──────────────────────────────────┤
  ├─<mnemonic file attribute value>─┤
  └─<abstract value mnemonic>───────┘

<Boolean attribute specification>

──<Boolean-valued file attribute name>─────────────────────────────────►
►─┬─────────────────────────────────┬──────────────────────────────────┤
  └─ = ─┬─<Boolean expression>──────┤
        └─<abstract value mnemonic>─┘

<pointer attribute specification>

──<pointer-valued file attribute name>── = ────────────────────────────►
►─┬─<pointer expression>──────┬────────────────────────────────────────┤
  ├─<string literal>──────────┤
  └─<abstract value mnemonic>─┘

<translate-table attribute specification>

──<translate-table-valued file attribute name>── = ────────────────────►
►─┬─<translate table identifier>─┬─────────────────────────────────────┤
  └─<intrinsic translate table>──┘

<attribute parameter list>

  ┌◄──────── , ───────┐
──┴─<constant number>─┴────────────────────────────────────────────────┤

<arithmetic-valued file attribute name>

<Boolean-valued file attribute name>

<pointer-valued file attribute name>

<translate-table-valued file attribute name>

<mnemonic file attribute value>

<abstract value mnemonic>

ALGOL supports all file attributes and file attribute values described in the File Attributes Programming Reference Manual.

File declaration can be used to set a file attribute to one of the abstract value mnemonics allowed for that file attribute.

The attributes for a particular file need not be specified in the FILE declaration. Attributes can be assigned values by using an appropriate assignment statement, the multiple attribute assignment statement, a compile-time or run-time file equation, or the I/O subsystem, which is the default option. Refer to the Work Flow Language (WFL) Programming Reference Manual for the file equation syntax.

Although the syntax allows more than one file identifier to precede the optional attribute specifications, only the identifier immediately before the attribute specifications is assigned the specified file attribute values. The other identifiers are assigned default file attribute values.

For example, the result of the following declaration is that the KIND attribute of file C is assigned the value DISK, and the KIND attributes of files A and B are assigned the default value for the KIND attribute, which might or might not be the value DISK.

FILE A,B,C(KIND=DISK)

For more information on file attributes and their default values, refer to the File Attributes Programming Reference Manual.

Valid mnemonics for file attributes are also type 3 reserved words in ALGOL. When it is not certain whether an identifier is a variable or a mnemonic, the compiler always assumes that the identifier is a variable or other local identifier if it is enclosed in parentheses. If the identifier is not enclosed in parentheses, the compiler always assumes it is a mnemonic. This rule can be used to resolve ambiguities when new attributes with names that conflict with local variables are added to the system.

A Boolean-valued file attribute whose name appears in a Boolean attribute specification without the = <Boolean expression> part is assigned the value TRUE.

When the value of a <pointer-valued file attribute name> is a <string literal>, the last character of the <string literal> must be a period (".").

A translate table identifier assigned to a translate-table-valued file attribute name must have been declared previously and must reference the first (or only) translate table declared in that particular TRANSLATETABLE declaration.

Attribute parameters are allowed in FILE declarations and MULTIPLE ATTRIBUTEASSIGNMENT statements. In a FILE declaration, the attribute specifications cannot reference the file identifier of the file being declared. For example, the following is not valid:

FILE F(MAXRECSIZE=90, BLOCKSIZE=F.MAXRECSIZE*10)