VMS Help PASCAL, Attributes *Conan The Librarian (sorry for the slow response - running on an old VAX) |
An attribute is an identifier that directs the Compaq Pascal compiler to change its behavior in some way. When an attribute is not explicitly stated, the compiler follows the default rules to assign properties to program elements. However, using attributes to override the defaults allows additional control over the properties of data items, routines, and compilation units. Syntax of a Compaq Pascal attribute: [ {identifier1 [[ ( { constant-expression | identifier2 } ,...) ]] },... ] The 'identifier1' is the name of the attribute. The 'constant-expression' is a compile-time integer expression that qualifies several of the Compaq Pascal attributes. The 'identifier2' is the name of an option available in one of the following cases: o With the CHECK, OPTIMIZE, or KEY attributes o With COMMON and PSECT attributes, indicating the name of a storage area o With the GLOBAL, EXTERNAL, WEAK_GLOBAL, and WEAK_EXTERNAL attributes, indicating an external name A list of attributes can appear anywhere in the VAR, TYPE, and CONST declaration sections, and anywhere in a program that a type, a type identifier, or the heading of a routine or compilation unit is legal. However, only one attribute from a particular class can appear in a given attribute list. The names of attributes, when used in a suitable context, cannot conflict with other identifiers with the same name in the program. Syntactically, an attribute list can appear before a VAR, TYPE, and CONST section in the declaration section. In this case, the attributes would apply to all elements in that particular section. However, at this time, Compaq Pascal only allows you to use the HIDDEN attribute in this way. Some attributes require a special form of constant expression called a name string. The syntax of a name string differs from that of other strings in Compaq Pascal only in that a name string cannot use the extended-string syntax. See the "Compaq Pascal Language Reference Manual" for the complete description of attributes.
Additional Information (explode) :
|