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 most 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.

We invite adventurous beginners to learn Smart Pascal.

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 to develop applications for web pages.

Newest! Your school network might block the Smart Pascal programs that we have inserted as objects into our pages. We add more than sixty links to Smart Pascal demonstrations and student programs so that you can access them directly. We also provide stepwise instructions for developing a simple form-based application using Version 2.1 of Smart Mobile Studio.

New! We have added tutorial pages on searching a Memo and a RichMemo. See also the overview of PPS content relevant to the Raspberry Pi.

New! We have added tutorial pages on using two units, JavaScript and cookies in Smart Pascal and a map (with the Leaflet library) in JavaScript.

New! We are pleased to publish the first contribution from Matthew, a promising young programmer. Matthew implemented resolutely his ambitious idea of a maze encompassing the six faces of a cube. The impressive result is the online game MazeOnCube, written in Smart Pascal. Two further Smart Pascal pages show you ways of making use of James's guidance for obtaining information from and controlling the Raspberry Pi's operating system.

New! Sometimes we see promising programs develop and look forward to their completion for publication. On other occasions we are pleasantly surprised by offerings of suitable programs "out of the blue". Nathaniel Oshunniyi's MatrixInverter, with its highly educational output that is perfect for the site, was a wonderful surprise!

New! In contrast, James's outstanding guidance on the Raspberry Pi has been published for some time on an experimental site and now we republish it with further details to encourage more of you around the world to take advantage of his research and development. You will learn a lot by replicating and trying to extend his code. The three new pages are Getting Started with a Web Server on the Pi, SSH and PSCP for the Raspberry Pi and Remote Control of a Raspberry Pi.

The next six paragraphs summarise other additions made during the last few weeks.

When writing the recent overview of graphics on the site we noticed some obvious gaps to fill with new material. Pages added very recently include Drawing on a WPF Canvas, Drawing on a WPF Coded Form, 3D Graphics using WPF and WPF Animation.

We add an overview of graphics to the appendix so that you can compare the functionality and ease of use of the selection of graphics software that we cover on PPS. Also, we supply the new page Drawing on an Image because this is often a better alternative to drawing on a PaintBox in a Lazarus form-based application.

We have a "mixed bag" of additions to existing tutorials. In-line Assembler in Lazarus on the Raspberry Pi has eight demonstrations that you can modify to help you to learn ARM assembly language. We supply Smart Pascal demonstrations of providing options to the user at the beginning of a game and supplying a TTF font so that the display of text is as required. For those of you on the lookout for new things to try with Lazarus, we demonstrate how to use the fpVectorial package to output Word documents and Scalable Graphics Format (SGF) files. See also how to use the TFileStream class for input and output of different types in the same file.

We add to our Smart Pascal graphics section Exclusion Zones, which demonstrates code to keep moving players and enemies out of areas such as walls and buildings. You can take advantage of inbuilt methods to make your code more concise.

Dom's on-line game Cool is our first Smart Pascal contribution by a Year 7 student. Beginners can learn by tweaking the code to change sizes, colours, speeds and feedback to the user. We wonder if and when Dom will be capable of emulating games like TowerOfArcher.

We are delighted to publish TowerOfArcher, George Wright's first Smart Pascal online game with images. See if, like us, you will want to return to the game (with a better performance next time). The game has attracted players from 25 countries within a few days.

If you would like to try developing your own visual component to install in Lazarus (and hence be available for dropping onto a form), see our example. For easy ways to display, modify, save and load data in Lazarus (in projects that do not require a relational database such as Access, MySQL or Firebird) follow our detailed instructions for linking a DBGrid, DataSource and DBNavigator to a MemdataSet or TBufDataset component.

Site Statistics February 2015

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

  • 358 pages of tutorial material for Pascal, 89 for Oxygene for Java and 68 for Smart Pascal (using the Smart Mobile Studio IDE);
  • 91 student programs spread over 327 pages;
  • 80 on-line Smart Pascal programs;
  • 63 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 340 terms linked to relevant pages
  • A Pascal index of routines with links to examples of the use of 311 procedures/functions;
  • An Oxygene for Java general index with 151 terms linked to relevant pages;
  • An Oxygene for Java routine index with links to examples of the use of 193 methods;
  • A Smart Pascal general index with 213 terms linked to relevant pages
  • A Smart Pascal routine index with links to examples of the use of 126 procedures/functions.
On February 11, the top ten user countries and their percentages of visits over the previous 31 days were reported by Google Analytics to be: United Kingdom (13.97%), United States (6.59%), Germany (6.27%), India (6.26%), Brazil (3.62%), Poland (3.09%), Indonesia (3.05%), Russia (3.00%), Netherlands (2.76%) and France (2.58%).

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

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

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

  1. TowerOfArcher (Smart Pascal)
  2. Cool (Smart Pascal)
  3. Pascal Pokemon Code for Windows
  4. MaxCircles (Smart Pascal)
  5. RockPaperScissors
  6. RandomPlatformScroller (Smart Pascal)
  7. PascalPokemon
  8. Battleships
  9. ChristmasProg
  10. Cars
Programming - a skill for life!

Introducing Pascal Programming for Schools