Chapter 10 Further Reading

Free Pascal Documentation

  • Free Pascal Reference Guide — Strings. The official documentation on string types, including ShortString, AnsiString, UnicodeString, WideString, and PChar. Covers memory management, reference counting, and codepage handling in detail. https://www.freepascal.org/docs-html/ref/refch3.html

  • Free Pascal RTL — System Unit String Routines. Complete reference for built-in string procedures and functions: Length, Copy, Pos, Insert, Delete, Concat, Str, Val, and others. https://www.freepascal.org/docs-html/rtl/system/

  • Free Pascal RTL — SysUtils String Functions. Documentation for IntToStr, StrToInt, FloatToStr, StrToFloat, Format, StringReplace, Trim, UpperCase, LowerCase, and related functions in the SysUtils unit. https://www.freepascal.org/docs-html/rtl/sysutils/

Books

  • Sedgewick, Robert and Kevin Wayne. Algorithms. 4th edition, Addison-Wesley, 2011. Part V covers string algorithms in depth: string sorting, tries, substring search (including Knuth-Morris-Pratt and Boyer-Moore), regular expressions, and data compression. The algorithms are language-agnostic and transfer directly to Pascal.

  • Aho, Alfred V., Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. 2nd edition, Pearson, 2006. Chapters 3–4 on lexical analysis and parsing formalize the state machine approach used in our CSV and command parsers. If you want to understand why state machines work for text processing, this is the definitive reference.

  • Friedl, Jeffrey E.F. Mastering Regular Expressions. 3rd edition, O'Reilly, 2006. While our chapter builds pattern matching from scratch, regular expressions are the standard tool for text processing in most languages. This book explains how regex engines work internally — useful even if you never use regex in Pascal.

Articles and Tutorials

  • Joel Spolsky. "The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)." Joel on Software, 2003. A clear and entertaining explanation of character encodings — ASCII, codepages, Unicode, UTF-8, and UTF-16. Essential background for understanding why Pascal has multiple string types. https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

  • RFC 4180 — Common Format and MIME Type for Comma-Separated Values (CSV) Files. The closest thing to a formal specification for CSV. Short and readable. Defines the rules for quoting, escaping, and line endings that our CSV parser implements. https://datatracker.ietf.org/doc/html/rfc4180

  • Singh, Simon. The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography. Anchor, 2000. An accessible history of cryptography, from Caesar ciphers and substitution ciphers (as in our Case Study 1) through the Enigma machine to modern public-key encryption. Provides the historical context for why the ciphers we implemented are significant despite being easily broken.

Historical Context

  • Perlis, Alan J. "Epigrams on Programming." ACM SIGPLAN Notices, vol. 17, no. 9, 1982, pp. 7–13. The source of our chapter's opening quote. Perlis's 130 epigrams remain remarkably relevant — many address the tension between data structures (like strings) and the algorithms that operate on them.

  • Wirth, Niklaus. "The Programming Language Pascal." Acta Informatica, vol. 1, 1971, pp. 35–63. The original Pascal specification. Note the absence of a built-in string type — strings were packed array[1..n] of char, and understanding this origin explains many of Pascal's string conventions.

Topics for Future Chapters

  • Regular Expressions in Free Pascal. The RegExpr unit provides full regular expression support. We will revisit pattern matching with regex in a later chapter after covering units and object-oriented programming.

  • Dynamic Arrays and String Lists. TStringList in Free Pascal provides a higher-level abstraction for working with collections of strings — sorting, searching, file I/O, name-value pairs. This builds on both strings (this chapter) and object-oriented programming (Part III).

  • File I/O Patterns. Our CSV parsing touched on file reading. Chapter 14 covers file I/O in depth, including binary files, typed files, and robust error handling.