Examples type coordinate is record xy integer end

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: an access type, a file type, a protected type, or a composite type with a subelement that is an access type, a file type, or a protected type. The denoted type or subtype need not be constrained. Examples: type COORDINATE is record X,Y: INTEGER; end record; subtype POSITIVE is INTEGER range 1 to INTEGER'HIGH; attribute LOCATION: COORDINATE; attribute PIN_NO: POSITIVE; NOTES 1--A given named entity E will be decorated with the user-defined attribute A if and only if an attribute specification for the value of attribute A exists in the same declarative part as the declaration of E. In the absence of such a specification, an attribute name of the form E'A is illegal. 2--A user-defined attribute is associated with the named entity denoted by the name specified in a declaration, not with the name itself. Hence, an attribute of an object can be referenced by using an alias for that object rather than the declared name of the object as the prefix of the attribute name, and the attribute refe...
View Full Document

Ask a homework question - tutors are online