PP4S Home Page

Welcome to the PP4S Website!

The aim of the website is to provide valuable, but free, resources to help promote Pascal programming in schools by sharing ideas, knowledge and experience. We welcome contributions and feedback on the site. Please let us know what you think.

We advise beginners to:
  1. follow the instructions on Getting Started with Lazarus or our section on Getting Started with Delphi;
  2. start to work through the first few tutorials in the order shown in the left panel of the tutorial contents page;
  3. look at the student programs, starting with the more straightforward ones at the beginning of the table and also the first few using the Crt unit.
Note: We encourage confident Pascal programmers to write applications, applets and Android apps in Oxygene for Java with the help of our tutorial and to use Smart Mobile Studio (SMS) to develop applications for web pages.

New! Josh Blake, in his contribution BattleshipGames, shows expertise in handling inheritance within his well-planned object-oriented approach. When running his program (available as an executable in the zip download) you can (1) find the battleships placed by the computer, (2) find out how many turns the program takes to find ships that you place, (3) play against the computer with a grid each or (4) play against a human opponent under the supervision of the computer.

New! Steven Binns writes superb comments to turn his My_first_sdl2 into a guide to getting started with SDL2. SDL2 offers advanced graphics capabilities including hardware acceleration.

New! Joel continues to display natural ability with his SMS online game RoamingBlockBuster. You shoot in the direction you are travelling at the blocks, which are moving in a mesmerising fashion.

New! We have added to the Resources section seven pages under the heading Getting Started with Oxygene for .Net. These pages show you how to develop starter console, WinForms and WPF applications and Windows Phone Apps. We also demonstrate the use of the Sugar library that enables you to share common code when writing for very different platforms.

The following paragraphs summarise additions made in the preceding two updates.

Steven Binns's Blink is an impressive game that he almost finished when in Year 11 but then set aside while fulfilling more pressing exam commitments. There are plenty of advanced features that the most able of you may be able to emulate in your own games. As usual, Steven uses SDL and OpenGL to good effect and this program renders images in addition to shapes.

We have added links from some Oxygene demonstrations (applications, applets and Android apps) to the equivalent code in RemObjects C# on our new Heroku website. The recently released compiler will appreciated by ambitious students who want to be at the "cutting edge". We have also made minor improvements to some tutorials and added further links to facilitate browsing through related content on the site. You can see some updated site statistics including reported data from Google Analytics at the bottom of this page.

Following instructions on the SMS website, we created our own node.js website hosted in the cloud by Heroku. This will contain demonstrations and student programs in languages other than Pascal and will allow us to experiment with server-side code. The first code on show is a Python program by Josh Blake and there are demonstrations of the brand new C# dialect from RemObjects. The new site includes an SMS web application that accesses details (stored in a PostgreSQL database) of our Pascal programs. You can view the names and descriptions of the programs created by a selected programmer then follow the link to the first page of each program on this website. You might need to wait a few seconds for the Heroku site to be activated if it has been idle for some time. We have included the new site among our Links as part of a major update of that page.

SMS is proving popular among students, who are developing games that should soon be ready for publication. Steven Binns provides a PlatformDemo to show you how to use object-oriented code to enable the user to press keys to make players jump from one platform to another. MaxCircles by Felix Thompson is a good example of a short program of the type we are looking for to demonstrate graphics. It begins with his original idea, which he then implements skilfully and comments thoroughly for the benefit of others. George, a new contributor, produced an interesting visual effect named ObjectMovingBalls while learning about object-oriented programming. Alex Karet's BlendingEllipses is another effective motion graphic.

We add an SMS tutorial page entitled Using the Intersect method of TRect to detect Collisions. You might find it useful for your games. We also include Experimenting with Smart Console Applications, which shows how you can customise the console and add an image to it.

Felix Thompson also contributes the Pascal program BigFibonacci. It neatly handles each digit as a separate element of an array and outputs the first Fibonacci number with one thousand digits.

We have added a resource entitled Getting Started with Pascal on the PiFace. The PiFace Digital add-on board makes it easier to make connections and more likely to preserve the Pi as you experiment with control systems.

Site Statistics March 2014

The site contains among its 779 pages in the site map:

  • 344 pages of tutorial material for Pascal, 85 for Oxygene for Java and 22 for Smart Mobile Studio (SMS);
  • 74 student programs spread over 255 pages;
  • 22 SMS programs running on our web pages;
  • 52 pages of resources such as the Getting Started series;
  • 30 pages of challenges such as suggestions for programs, programs to complete and programs to debug;
  • A Pascal general index with 291 terms linked to relevant pages
  • A Pascal index of routines with links to examples of the use of 285 procedures/functions;
  • An Oxygene for Java general index with 149 terms linked to relevant pages;
  • An Oxygene for Java routine index with links to examples of the use of 193 methods.
On March 23, the top ten user countries and their percentages of visits over the previous 30 days were reported by Google Analytics to be: United Kingdom (15.20%), United States (9.67%), Germany (5.60%), Brazil (5.05%), India (4.66%), Netherlands (3.48%), France (3.10%), Indonesia (2.97%), Italy (2.95%) and Russia (2.88%).

During the same period the ten most frequently visited tutorial/resource pages were reported to be:

  1. ARM Assembler
  2. Writing your First Pascal Program using Lazarus
  3. Using a DBGrid in Lazarus
  4. Creating and Using Stored Procedures
  5. Using a String Grid
  6. Getting Started with Pascal on the Pi
  7. Common Error Checklists
  8. Using ClientDataSets in Delphi
  9. Delphi Canvas Demonstration
  10. Using a DBGrid in Delphi

The top ten most viewed pages of student programs were reported to be:

  1. Pascal Pokemon Code for Windows
  2. PascalPokemon
  3. MaxCircles
  4. ChristmasProg
  5. RockPaperScissors
  6. Battleships
  7. Morse Code
  8. SUVAT
  9. DelphiManager
  10. BigFibonacci
Programming - a skill for life!

Introducing Pascal Programming for Schools