Further Reading: Variables, Types, and Expressions

Free Pascal Documentation

  • Free Pascal Reference Guide, Chapter 3: Types https://www.freepascal.org/docs-html/ref/refch3.html The authoritative reference for all types available in Free Pascal, including integer types, floating-point types, string types, and structured types. Keep this bookmarked — you will refer to it throughout the course.

  • Free Pascal Reference Guide, Chapter 4: Variables https://www.freepascal.org/docs-html/ref/refch4.html Covers variable declarations, initialization, thread variables, and properties. The section on typed constants is particularly relevant to Section 3.7.

  • Free Pascal Reference Guide, Chapter 12: Expressions https://www.freepascal.org/docs-html/ref/refch12.html Complete documentation of expression syntax, operator precedence, and type compatibility rules.

Books

  • Kathleen Jensen and Niklaus Wirth, Pascal: User Manual and Report (4th edition, Springer, 1991) The original Pascal specification by the language's creator. Chapter 4 ("Declarations and Definitions") and Chapter 6 ("Scalar and Subrange Types") are directly relevant to this chapter's material. Written with characteristic clarity and precision.

  • Benjamin C. Pierce, Types and Programming Languages (MIT Press, 2002) The definitive academic treatment of type systems. While this is a graduate-level text, the first three chapters ("Introduction," "Mathematical Preliminaries," and "Untyped Arithmetic Expressions") are accessible and provide deep insight into why type systems exist. Recommended for students who want to understand the theoretical foundations.

  • Robert W. Sebesta, Concepts of Programming Languages (12th edition, Pearson, 2018) Chapter 6 ("Data Types") provides an excellent survey of how different languages handle types, including Pascal's approach. Good for understanding where Pascal fits in the broader landscape.

Articles and Reports

  • Lions, J.L. et al., "ARIANE 5: Flight 501 Failure" (ESA Report, 1996) https://esamultimedia.esa.int/docs/esa-x-1819eng.pdf The official inquiry board report on the Ariane 5 disaster discussed in Case Study 1. A masterclass in failure analysis. The relevant passage about the 64-to-16-bit conversion is in Section 2.1.

  • Stephenson, A.G. et al., "Mars Climate Orbiter Mishap Investigation Board Phase I Report" (NASA, 1999) The official report on the Mars Climate Orbiter unit mismatch. Documents how a simple type confusion — Imperial vs. metric units — led to the loss of a $125 million spacecraft.

  • U.S. Government Accountability Office, "Patriot Missile Defense: Software Problem Led to System Failure at Dhahran, Saudi Arabia" (GAO/IMTEC-92-26, 1992) The official report on the Patriot missile timing error. A vivid example of how floating-point precision matters in life-or-death systems.

  • Goldberg, David, "What Every Computer Scientist Should Know About Floating-Point Arithmetic" (ACM Computing Surveys, 1991) The classic paper on floating-point representation and its pitfalls. Essential reading for understanding why 0.1 + 0.2 ≠ 0.3. Available online at various mirrors. Sections 1–2 are accessible to beginners; later sections require more mathematical background.

Online Resources

  • IEEE 754 Floating-Point Visualization https://www.h-schmidt.net/FloatConverter/IEEE754.html An interactive tool that lets you type a decimal number and see its binary IEEE 754 representation. Excellent for understanding why some numbers cannot be represented exactly.

  • ASCII Table Reference https://www.asciitable.com/ A clean reference for ASCII character codes. Useful when working with Ord and Chr functions.

  • Free Pascal Wiki: Data Types https://wiki.freepascal.org/Data_type Community-maintained documentation on Free Pascal's type system, with practical examples and common patterns.

Videos

  • "The Ariane 5 Failure" — Computerphile (YouTube) An accessible 10-minute explanation of the Ariane 5 integer overflow disaster, with visual aids showing exactly how the 64-to-16-bit conversion failed.

  • "Floating Point Numbers" — Computerphile (YouTube) An excellent visual explanation of how floating-point numbers work in binary, why precision is limited, and why certain values (like 0.1) cannot be represented exactly.

What to Explore Next

If this chapter's material sparked your interest, consider exploring:

  1. Enumerated and subrange types (Chapter 8) — Pascal's way of creating custom types that are even more restrictive and safer than the Big Five.
  2. Records (Chapter 8) — how to group related variables (like Rosa's expense fields) into a single structured type.
  3. The history of type systems — from FORTRAN (essentially no types) to Pascal (strong static types) to Rust (ownership-based types), the evolution of type systems is one of the most important threads in programming language history.