Chapter 7 Further Reading: Procedures and Functions
Curated resources for deeper exploration of procedural abstraction, parameter passing, and program design. Organized by tier.
Primary Sources (Free Pascal Documentation)
-
Free Pascal Language Reference — Procedures and Functions https://www.freepascal.org/docs-html/ref/refch14.html The authoritative reference for procedure and function syntax in Free Pascal, including all parameter modes, overloading (covered in later chapters), and calling conventions. Consult this when you need the precise rules.
-
Free Pascal Language Reference — Scope https://www.freepascal.org/docs-html/ref/refch2.html Details on identifier scope, visibility, and the rules governing local, global, and nested declarations. Supplements what you learned in Section 7.7 and previews Chapter 8's deeper treatment.
-
Free Pascal Programmer's Guide — Procedures and Functions https://www.freepascal.org/docs-html/prog/progch6.html Practical guidance on using procedures and functions effectively, including compiler modes and compatibility notes for Turbo Pascal and Delphi modes.
Secondary Sources (Textbooks and Authoritative References)
-
Wirth, Niklaus. "Program Development by Stepwise Refinement." Communications of the ACM, 14(4), 1971. The foundational paper on top-down design and procedural decomposition. Wirth demonstrates the process using a small example program, refining it step by step. Remarkably readable fifty years later and directly relevant to Section 7.9.
-
Wirth, Niklaus. Algorithms + Data Structures = Programs. Prentice-Hall, 1976. Wirth's classic textbook (the source of our Theme T5) uses Pascal throughout. Chapters 1–3 cover program structure, including procedures and functions, in Wirth's characteristically precise style. Available in many university libraries and as a used book.
-
Dale, Nell and Weems, Chip. Pascal Plus Data Structures. 5th ed. Jones & Bartlett, 2003. A standard college textbook that covers procedures, functions, and parameter passing in exceptional detail. Chapters 7–8 provide worked examples and exercises at a level similar to this chapter.
-
Jensen, Kathleen and Wirth, Niklaus. Pascal User Manual and Report. 4th ed. Springer, 1991. The official language report by Pascal's creator. Section 10 (Procedures and Functions) gives the formal definition. Dense but authoritative. Essential for anyone who wants to understand exactly what "standard Pascal" means.
-
Cantu, Marco. Object Pascal Handbook. Independently published, updated regularly. https://www.marcocantu.com/objectpascalhandbook/ Covers procedures and functions in Object Pascal (Delphi/Free Pascal) including modern features like overloading, inline functions, and anonymous methods. Chapters 5–6 are most relevant. An excellent bridge between this textbook and professional Delphi development.
Tertiary Sources (Tutorials, Articles, and Community Resources)
-
Free Pascal Wiki — Procedures and Functions Tutorial https://wiki.freepascal.org/Procedures_and_Functions A community-written tutorial with examples covering basic procedures, functions, parameters, and forward declarations. Good for quick reference and additional examples.
-
Tao Yue. "Pascal Programming: Procedures and Functions." https://www.taoyue.com/tutorials/pascal/ A concise online tutorial covering Pascal fundamentals. The procedures and functions section provides clear, minimal examples suitable for review.
-
Learn Pascal (Lazarus IDE Wiki) https://wiki.freepascal.org/Pascal_Basics A beginner-friendly walkthrough of Pascal fundamentals including a section on subprogram organization. Useful if you want a second perspective on the same material.
-
"Structured Programming" — Wikipedia https://en.wikipedia.org/wiki/Structured_programming Background on the structured programming paradigm that Pascal was designed to teach. Places procedures and functions in their historical context alongside Dijkstra's and Wirth's contributions.
-
"Don't Repeat Yourself" — Wikipedia https://en.wikipedia.org/wiki/Don%27t_repeat_yourself The DRY principle, coined by Andy Hunt and Dave Thomas in The Pragmatic Programmer (1999), formalized what Pascal's procedure mechanism was already encouraging in 1970. Understanding DRY deepens your appreciation of why procedures matter.
Looking Ahead
-
Chapter 8 (Scope, Parameters, and the Call Stack) extends the material in this chapter by showing exactly what happens in memory when procedures are called — stack frames, parameter passing at the machine level, and the rules of scope.
-
Chapter 22 (Recursion) builds on the forward declaration and mutual recursion preview in Section 7.8. You will write functions that call themselves to solve problems like computing factorials, traversing trees, and generating permutations.
-
Chapter 33 (Units and Packages) shows how to organize procedures and functions across multiple source files using Pascal's unit system — the natural evolution of the decomposition techniques introduced here.