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.

Chapters cover:

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.

Read the book

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.

Chapters cover:

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.

Read the 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.

Chapters include:

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.

Read the 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.

Read the book

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.

Chapters cover:

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.

Read the book

All books in this series:

Free Programming Books Java General-purpose, concurrent, class-based, object-oriented, high-level language C General-purpose, procedural, portable, high-level language Python General-purpose, structured, powerful language C++ General-purpose, portable, free-form, multi-paradigm language C# Combines the power and flexibility of C++ with the simplicity of Visual Basic JavaScript Interpreted, prototype-based, scripting language PHP PHP has been at the helm of the web for many years HTML HyperText Markup Language SQL Access and manipulate data held in a relational database management system Ruby General purpose, scripting, structured, flexible, fully object-oriented language Assembly As close to writing machine code without writing in pure hexadecimal Swift Powerful and intuitive general-purpose programming language Groovy Powerful, optionally typed and dynamic language Go Compiled, statically typed programming language Pascal Imperative and procedural language designed in the late 1960s Perl High-level, general-purpose, interpreted, scripting, dynamic language R De facto standard among statisticians and data analysts COBOL Common Business-Oriented Language Scala Modern, object-functional, multi-paradigm, Java-based language Fortran The first high-level language, using the first compiler Scratch Visual programming language designed for 8-16 year-old children Lua Designed as an embeddable scripting language Logo Dialect of Lisp that features interactivity, modularity, extensibility Rust Ideal for systems, embedded, and other performance critical code Lisp Unique features - excellent to study programming constructs Ada ALGOL-like programming language, extended from Pascal and other languages Haskell Standardized, general-purpose, polymorphically, statically typed language Scheme A general-purpose, functional language descended from Lisp and Algol Prolog A general purpose, declarative, logic programming language Forth Imperative stack-based programming language Clojure Dialect of the Lisp programming language Julia High-level, high-performance language for technical computing Awk Versatile language designed for pattern scanning and processing language CoffeeScript Transcompiles into JavaScript inspired by Ruby, Python and Haskell BASIC Beginner’s All-purpose Symbolic Instruction Code Erlang General-purpose, concurrent, declarative, functional language VimL Powerful scripting language of the Vim editor OCaml The main implementation of the Caml language ECMAScript Best known as the language embedded in web browsers Bash Shell and command language; popular both as a shell and a scripting language LaTeX Professional document preparation system and document markup language TeX Markup and programming language - create professional quality typeset text Arduino Inexpensive, flexible, open source microcontroller platform TypeScript Strict syntactical superset of JavaScript adding optional static typing Elixir Relatively new functional language running on the Erlang virtual machine F# Uses functional, imperative, and object-oriented programming methods Tcl Dynamic language based on concepts of Lisp, C, and Unix shells Factor Dynamic stack-based programming language Eiffel Object-oriented language designed by Bertrand Meyer Agda Dependently typed functional language based on intuitionistic Type Theory Icon Wide variety of features for processing and presenting symbolic data XML Rules for defining semantic tags describing structure ad meaning Vala Object-oriented language, syntactically similar to C# Standard ML General-purpose functional language characterized as "Lisp with types" D General-purpose systems programming language with a C-like syntax

Related articles