Sample Code for Pascal

From SwinBrain

This page contains a number of links related to Pascal sample code.

Samples

  • Area and Diameter Calculator: This program calculates the area and diameter of a circle based upon the radius entered by the user.
  • Ascii printer: This program prints the available characters to the console.
  • Screen Saver: This sample demonstrates how to create a graphics window and draw to it using Free Pascal.

Worked Examples

These samples contains some details on the thinking that has gone into the solution. You will see the code as it moves through the various development phases.

  • Area of a Square: This sample illustrates some of the basic steps involved in developing a program. The program developed solves the age of questions... what is the area of a square?
  • Bouncing Ball: This is a "ball" that bounces around within a defined area.
  • Maze Game: This game displays a maze for the player to move around within.
  • Pascal Worked Example: Pong: This sample walks you through the development of a simple game called Pong. This is a long sample that illustrates a number of development points.

[edit]Sample Code » C | C++ | .NET | Pascal | Perl | T-Sql | XHTML | Python | others to come