Simply the fastest way to learn to program Object Pascal – either with the industry-standard Delphi system on Windows or with the multi-platform Lazarus and Free Pascal. Just drag-and-drop, click and code.
Simply the fastest way to learn to program Object Pascal – either with the industry-standard Delphi system on Windows or with the multi-platform Lazarus and Free Pascal. Just drag-and-drop, click and code.
The knowledge you gain will give to entry to the world of commercial application development using Lazarus or Delphi.
Delphi has an elegant drag-and-drop IDE with lots of integrated coding and debugging tools. You can download a free copy of Delphi for Windows, or you can use the free, open-source Lazarus IDE for designing and coding languages on Windows, Mac or Linux. Full source code of all the example projects is provided with this course.
What you will learn:
The fundamentals of programming – from the ground up
Object orientation – its principles and practice
The Object Pascal language – for neat, elegant, maintainable programming
Who should take the course
Beginners – if you’ve never coded before, you can learn pascal step by step
This Pascal programming tutorial is also feasible for those Programmers who’ve used other languages – Ruby, Python or Java but want to extend their knowledge? This is for you.
Cross-platform developers – with Lazarus and Free Pascal, write on one OS, compile on a different one.
Huw Collingbourne has programmed in Object Pascal since the first release of Delphi in 1995. For over 10 years he was the Delphi programming columnist for PC Plus magazine in the UK. This course gives you in-depth instruction in programming with Delphi and the Object Pascal language.
Using Lazarus, you can create a program, complete with its own user interface, in a matter of moments. Just follow along to write a ‘Hello world’ program.
This video shows how to load one of the sample projects supplied with this course and run it inside the Lazarus IDE. It also highlights a few of the common code elements of Object Pascal programs.
Here we learn how to save the values of data items by assigning them to named ‘variables’.
Sometimes you may want to ensure that a value cannot be changed. That’s what ‘constants’ are for.
You can document your code by embedding comments. Here I show Pascal’s three alternatives comment types.
Procedures and functions give you a way of dividing your code into named blocks for easy re-use. Here I explain the basics of procedures, functions and parameters.
When you precede parameters with the var keyword in a procedure or function, the arguments are passed ‘by reference’; rather than ‘by value’. Here I explain what that means and why it is important.
What is the difference between procedure myProcedure and procedure TForm1.myProcedure? Welcome to the world of object orientation. Here I take a first glance at ‘form methods’.
This tutorial shows an example of how a single procedure can do calculations for three different types of bank account. This illustrates the advantage of using procedures and functions to avoid repetition and keep your programs simple.
How to you subtract grapefruits from oranges or add 10 to a sonnet? These may sound like insoluble problems. But anything is possible if you make sure you are working with compatible data types.
The compiler will check that the arguments you send to a procedure match the declared parameters in both number and type. This can save your program from encountering unexpected errors when it is run.
When you do arithmetic you’ll need to use operators such as +, -, *, /, div and mod. You can find out more about these in The Little Book of Pascal (the eBook supplied with this course) and in the demo program shown in this video.
What is the difference between local and global scope and why does it matter? And a question: what happens when you declare two or more variables with the same name? The answer: It all depends on their scope!
Here we find out how to repeat operations in Pascal. We start out with a for loop which lets us create a table of characters from their ASCII codes. If you want to follow along, be sure to run the ascii and ifelse projects froom the code archive.
If you find that numerous if..else tests are making your code hard to understand, consider simplifying it with a case statement. This tutorial explains how…
for loops are fine when you know in advance how many times an operation needs to be repeated. Sometimes you may not know this, however, in which case the while and repeat loops can be used, as explained here.
Here I explain how to create lists of items in the form of sequential arrays and how to iterate through the items in an array using a loop of find a single data item at a specific array index.
We’ve used many standard types such as string and integer in our projects so far. You can also create your own types. This video explains how to do this and why it may be useful.
You can create complex data-types which, just like commercial database applications, wrap up multiple bits of data as the fields of a record. Here I show how to create a CD record type with fields to store the name, artist, price and label of a CD.
Using Free Pascal or Delphi IO procedures, you can read and write structured data to and from a file. Here I show how to save and load a file of CD records.
It is fairly easy to save and load text files using Delphi or Lazarus. Here I explain how to read and write characters and strings from a text file and display them in a memo or process the text and write it out to a new file.
Here we take a first look at the principles Object Orientated Programming (OOP). I’ll explain how objects are created from classes and how they may form ‘family trees’ of ancestors and descendants.
Here I explain the difference between objects and records and show how to define a simple CD class, then create CD objects by calling the class’s ‘constructor’.
There are several ways to save and load objects to disk but none of them is as simple as saving and loading records. Here I show a simple trick that lets you save data from objects to a file of records.
Even the forms and controls, such as Buttons and Memos are objects based on Delphi or Lazarus classes, as this lesson explains.
When defining methods for Form classes or custom classes you need to enter both their definition and their implementation. Here I explain how a simple keystroke-combination can save you the trouble.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.