1985 | OriginalPaper | Buchkapitel
Type Declarations
verfasst von : Professor Dr. Niklaus Wirth
Erschienen in: Programming in Modula-2
Verlag: Springer Berlin Heidelberg
Enthalten in: Professional Book Archive
Aktivieren Sie unsere intelligente Suche um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
Every variable declaration specifies the variable’s type as its constant property. The type can be one of the standard, primitive types, or it may be of a type declared in the program itself. Type declarations have the form $$\$ \quad {\text{TypeDeclaration = identifier = type}}.$$ They are preceded by the symbol TYPE Types are classified into unstructured and structured types. Each type essentially defines the set of values which a variable of this type may assume. A value of an unstructured type is an atomic unit, whereas a value of structured type has components (elements). For example, the type CARDINAL is unstructured; its elements are atomic. It does not make sense, e.g. to refer to the third bit of the value 13; the circumstance that a number may “have a third bit”, or a second digit, is a characteristic of its (internal) representation, which intentionally is to remain unknown.