Skip to main content

Type Declarations

  • Chapter
  • 68 Accesses

Part of the book series: Texts and Monographs in Computer Science ((MCS))

Abstract

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1985 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Wirth, N. (1985). Type Declarations. In: Programming in Modula-2. Texts and Monographs in Computer Science. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-96878-5_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-96878-5_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-96880-8

  • Online ISBN: 978-3-642-96878-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics