Pascal is an imperative and procedural programming language designed in the late 1960s by Niklaus Wirth to teach structured programming using subprograms called procedures and functions. The language is a direct descendant from ALGOL 60, and takes programming components from ALGOL 68 and ALGOL-W. Pascal was named in honour after the French mathematician, physicist, and philosopher Blaise Pascal who helped to pioneer computer development.
Pascal is a popular teaching language to introduce structured programming techniques to students. There are many benefits from this type of programming such as code reusability, partitioning code into readable modules and procedures, and help programmers work together on code simultaneously. The language also lends itself to teaching with its easy syntax. Pascal is a strongly typed language, procedural, case insensitive, with extensive error checking. It has built in data types such as arrays, records, files and sets. There are also user defined data types. Pascal supports object oriented programming.
This article selects the best open source books that’ll give readers a firm foundation in developing Pascal software.
1. Start Programming using Object Pascal by Motaz Abdel Azeem
Start Programming using Object Pascal is written for programmers who wish to learn Object Pascal. The book is also suitable as a first programming book for new students and non-programmers. It illustrates programming techniques in general in addition to the Object Pascal Language. Object Pascal is a general purpose hybrid (structured and object oriented programming) language.
The examples in the book make use of Lazarus and Free Pascal.
- Language Basics – examines variables, sub types, conditional branching, the If condition, loops, for loop, repeat until loop, while loop, strings, copy function, insert procedure, delete procedure, trim function, stringreplace function. The chapter also covers arrays, records, files, text files, typed files, constants, sets, exception handling, and more. The chapter proceeds to illustrate what has been taught through a number of programs including a weight program, restaurant program, a keyboard program, a marks program, and a cars database program.
- Structured Programming – write procedures that can be used in applications, introduces parameters, defining local variables, functions as input parameters, units, procedure and function overloading, default value parameters, sorting, bubble sort algorithm, selection sort algorithm, shell sort algorithm, and string sorting.
- GUI – create GUI applications with Lazarus.
- Object Oriented Programing – a brief introduction into the type of programming where the entities of an application are described as objects.
The book is licensed under the Creative Commons.
2. Essential Pascal (2nd Edition) by Marco Cantù
Essential Pascal is an online introduction to the Pascal programming language. This book has been written by Marco Cantù (the author of the best selling book, Mastering Delphi). It covers the language form the perspective of Borland’s Delphi development environment.
- A Short History of the Pascal Language.
- Coding in Pascal – highlights elements of Pascal coding style: comments, use of uppercase, pretty-printing, syntax highlighting, code templates, language statements, keywords, and expressions and operators.
- Types, Variables, and Constants.
- User-Defined Data Types – define data types by means of type constructors, such as subrange types, array types, record types, enumerated types, pointer types, and set types.
- Statements – based on keywords and other elements to indicate to a program a sequence of operations to perform. The basic types of commands explored are simple and compound statements, assignment statements, conditional statements, case statements, loops, and the with statement.
- Procedures and Functions – introduces reference parameters, constant parameters, open array parameters, type-variant open array parameters, Delphi calling conventions, forward declarations, procedural types, function overloading, and default parameters.
- Handling Strings – types of strings, using long strings, looking at strings in memory, and formatting strings.
- Memory – looks at dynamic arrays.
- Windows Programming.
- Variants – discusses the Variant data type from a general perspective.
- Program and Units.
- Files in the Pascal Language.
This book is not published under a specific license, but it’s sufficiently open to regard it as a free book.
3. Essential Delphi by Marco Cantù
This book is a gentle introduction to Borland Delphi. A lot of the material in this book featured in Mastering Delphi.
- A Form is a Window.
- Highlights of the Delphi Environment.
- The Object Repository and the Delphi Wizards.
- A Tour of the Basic Components.
- Creating and Handling Menus.
- Multimedia Fun.
The author’s website does not currently offer a valid link to download the book, but a quick Google search finds copies of the book.
This book is not published under a specific license, but it’s sufficiently open to regard it as a free book.
4. Free Pascal Reference Guide by Michaël Van Canneyt
This book is a reference for the Pascal language as implemented by the Free Pascal compiler. It describes all Pascal constructs supported by Free Pascal, and lists all supported data types. The aim is to list which Pascal constructs are supported, and to show where the Free Pascal implementation differs from the Turbo Pascal or Delphi implementations.
This book does not aim to provide a detailed guide to Pascal.
This work is published under an open source license.
5. Pascal Programming by Wikibooks
Pascal Programming offers a gentle introduction for anyone looking to learn Pascal.
The book includes a syntax cheat sheet.
Text is available under the Creative Commons Attribution-ShareAlike License.
- Standard Pascal – explores variables and constants, input and output, boolean expressions and control flow, Pascal syntax and functions, enumerations, sets, arrays/lists, strings, records, pointers, and files.
- Extensions – units, object oriented programming, exporting to libraries, foreign function interfaces, generics, and other extensions.
- Preprocessor functionality.
- Syntax cheat sheet.
All books in this series:
|Free Programming Books|
|Ada||ALGOL-like programming language, extended from Pascal and other languages|
|Agda||Dependently typed functional language based on intuitionistic Type Theory|
|Arduino||Inexpensive, flexible, open source microcontroller platform|
|Assembly||As close to writing machine code without writing in pure hexadecimal|
|Awk||Versatile language designed for pattern scanning and processing language|
|Bash||Shell and command language; popular both as a shell and a scripting language|
|BASIC||Beginner’s All-purpose Symbolic Instruction Code|
|C||General-purpose, procedural, portable, high-level language|
|C++||General-purpose, portable, free-form, multi-paradigm language|
|C#||Combines the power and flexibility of C++ with the simplicity of Visual Basic|
|Clojure||Dialect of the Lisp programming language|
|COBOL||Common Business-Oriented Language|
|Coq||Dependently typed language similar to Agda, Idris, F* and others|
|Crystal||General-purpose, concurrent, multi-paradigm, object-oriented language|
|CSS||CSS (Cascading Style Sheets) specifies a web page’s appearance|
|D||General-purpose systems programming language with a C-like syntax|
|Dart||Client-optimized language for fast apps on multiple platforms|
|Dylan||Multi-paradigm language supporting functional and object-oriented coding|
|ECMAScript||Best known as the language embedded in web browsers|
|Eiffel||Object-oriented language designed by Bertrand Meyer|
|Elixir||Relatively new functional language running on the Erlang virtual machine|
|Erlang||General-purpose, concurrent, declarative, functional language|
|F#||Uses functional, imperative, and object-oriented programming methods|
|Factor||Dynamic stack-based programming language|
|Forth||Imperative stack-based programming language|
|Fortran||The first high-level language, using the first compiler|
|Go||Compiled, statically typed programming language|
|Groovy||Powerful, optionally typed and dynamic language|
|Haskell||Standardized, general-purpose, polymorphically, statically typed language|
|HTML||HyperText Markup Language|
|Icon||Wide variety of features for processing and presenting symbolic data|
|J||Array programming language based primarily on APL|
|Java||General-purpose, concurrent, class-based, object-oriented, high-level language|
|Julia||High-level, high-performance language for technical computing|
|Kotlin||More modern version of Java|
|LabVIEW||Designed to enable domain experts to build power systems quickly|
|LaTeX||Professional document preparation system and document markup language|
|Lisp||Unique features - excellent to study programming constructs|
|Logo||Dialect of Lisp that features interactivity, modularity, extensibility|
|Lua||Designed as an embeddable scripting language|
|Markdown||Plain text formatting syntax designed to be easy-to-read and easy-to-write|
|Objective-C||Object-oriented language that adds Smalltalk-style messaging to C|
|OCaml||The main implementation of the Caml language|
|Pascal||Imperative and procedural language designed in the late 1960s|
|Perl||High-level, general-purpose, interpreted, scripting, dynamic language|
|PHP||PHP has been at the helm of the web for many years|
|PostScript||Interpreted, stack-based and Turing complete language|
|Prolog||A general purpose, declarative, logic programming language|
|Python||General-purpose, structured, powerful language|
|QML||Hierarchical declarative language for user interface layout - JSON-like syntax|
|R||De facto standard among statisticians and data analysts|
|Racket||General-purpose, object-oriented, multi-paradigm, functional language|
|Raku||Member of the Perl family of programming languages|
|Ruby||General purpose, scripting, structured, flexible, fully object-oriented language|
|Rust||Ideal for systems, embedded, and other performance critical code|
|Scala||Modern, object-functional, multi-paradigm, Java-based language|
|Scheme||A general-purpose, functional language descended from Lisp and Algol|
|Scratch||Visual programming language designed for 8-16 year-old children|
|SQL||Access and manipulate data held in a relational database management system|
|Standard ML||General-purpose functional language characterized as "Lisp with types"|
|Swift||Powerful and intuitive general-purpose programming language|
|Tcl||Dynamic language based on concepts of Lisp, C, and Unix shells|
|TeX||Markup and programming language - create professional quality typeset text|
|Vala||Object-oriented language, syntactically similar to C#|
|VHDL||Hardware description language used in electronic design automation|
|VimL||Powerful scripting language of the Vim editor|
|XML||Rules for defining semantic tags describing structure ad meaning|