Learn Pascal Programming Tutorial

This complete course progressively introduces the basics of programming. The support language is Pascal and the development environment chosen by the author is Lazarus.
In the first part are gathered useful notions to introduce before starting properly the course of programming. The following sections are devoted to subroutines, control structures, tables, structured types, and files, respectively.

Table of contents

  • Lesson 1 - Introduction to Pascal
  • About Pascal
  • What you will need
  • Your first program
  • Compiling
  • More commands
  • Using commands from units
  • Comments
  • Lesson 2 - Colors, Coordinates, Windows and Sound
  • Screen coordinates
  • Windows
  • Sound
  • Lesson 3 - Variables and Constants
  • What are variables?
  • Using variables
  • Calculations with variables
  • Constants
  • Lesson 4 - String Handling and Conversions
  • Lesson 5 - Decisions
  • if then else
  • Case
  • Lesson 6 - Loops
  • For loop
  • While loop
  • Repeat until loop
  • Break and Continue
  • Lesson 7 - Arrays
  • Sorting arrays
  • Lesson 8 - Types, Records and Sets
  • Lesson 9 - Procedures and Functions
  • Global and Local variables
  • Functions
  • Lesson 10 - Text Files
  • Lesson 11 - Data Files
  • Lesson 12 - Units
  • Lesson 13 - Pointers
  • What is a pointer?
  • Declaring and using typed pointers
  • Lesson 14 - Linked Lists
  • What is a linked list
  • Single linked lists
  • Queues

About Pascal

The Pascal programming language was created by Niklaus Wirth in 1970. It was named after Blaise Pascal, a famous French Mathematician. It was made as a language to teach programming and to be reliable and efficient. Pascal has since become more than just an academic language and is now used commercially.

What you will need

Before you start learning Pascal, you will need a Pascal compiler. This tutorial uses the Free Pascal Compiler. You can find a list of other Pascal compilers at TheFreeCountry's Pascal compiler list.

Your first program

The first thing to do is to either open your IDE if your compiler comes with one or open a text editor.
We always start a program by typing its name. Type program and the name of the program next to it. We will call our first program "Hello" because it is going to print the words "Hello world" on the screen.

program Hello;

Next we will type begin and end. We are going to type the main body of the program
between these 2 keywords. Remember to put the full stop after the end.

program Hello;

begin
end.

The Write command prints words on the screen.

program Hello;

begin

Write('Hello world');
end.

You will see that the "Hello world" is between single quotes. This is because it is what is called a string. All strings must be like this. The semi-colon at the end of the line is a statement separator. You must always remember to put it at the end of the line.

Size : 274.011 Kb
File type : pdf
Downloads: 1244
Created: 2018-05-23

Others Pascal Tutorials

The Pascal Programming Language

Others related eBooks about Learn Pascal Programming Tutorial

Haskell: Functional Programming with Types

In this book, we aim to introduce you both to the Haskell language, from the very basics to its most advanced features, and to computer programming in general. Seasoned programmers, we urge you to be especially patient with this process. In all likelihood, the languages you are most familiar with ...

Problem Solving with Algorithms and Data Structures Using Python

This books is about computer science. It is also about Python. However, there is much more. The study of algorithms and data structures is central to understanding what computer science is all about. Learning computer science is not unlike learning any other type of difficult subject matter. The onl...

You Don't Know JS Yet: Get Started

Download free course You Don't Know JS Yet: Get Started, pdf file on 143 pages by Kyle Simpson....

First Semester in Numerical Analysis with Julia

This book presents the theory and methods, together with the implementation of the algorithms using the Julia programming language (version 1.1.0). The book covers computer arithmetic, root-finding, numerical quadrature and differentiation, and approximation theory. ...

Android on x86: An Introduction to Optimizing for Intel Architecture

This book is a one-stop reference guide to mindful programming and the unique challenges and opportunities that arise from x86 architectures. It compiles the best practices and procedures associated with application development for devices using Intel's popular line of microprocessors....

C# Features Succinctly

Download free course C# Features Succinctly, pdf file on 77 pages by Dirk Strauss....

Programming in Fortran 95

Download Fortran 95 course, PDF tutorial for beginners to learn the basics of Fortran programming language....

Beginner's Android Development

Beginner's Android Development Tutorial in PDF,free training course document under 26 pages to learn the basics of Mobile development....

Java Succinctly Part 2

Download free course Java Succinctly Part 2, pdf file on 134 pages by Christopher Rose....

Exploring Swift

Swift is more than just a modern replacement for Objective-C. Ever since going open source..., download free Swift tutorial in PDF (94 pages) created by ....