Turbo Pascal 7.0 Guide
Where Next?

If you have completed at least some of the exercises in each of the sections of this guide, then you should have enough experience of using Pascal for the purposes of the Module 1 examination for AS Computing. This guide is by no means exhaustive and touches only on the main areas of the language.

It is worth the effort, and lots of fun, to develop your programming skills further. Not only will this help you in the examination, where you will be more comfortable with reading Pascal code, but also help with A2 work.

The programs that you have written so far are short and simple. The exercises are designed to get you used to the structures in each section of the guide. You would find it useful and interesting to develop more complex programs. This requires you to think ahead and break down the problem into manageable chunks that you can test as work towards a finished solution.

Some ideas are as follows,

Quiz Program

There are lots of ways to construct a quiz, multiple choice, millionaire style and many more. The important thing would be to make a quiz that reads its question data from a text file. This would allow you to explore the disk reading and writing functions that Pascal has.

You could also make a maths program based on random questions to test a student's knowledge of their multiplication tables. The scores could be saved in a high score table.

Graphics

It's easy to change the colour of the text or the background. More complex is drawing shapes according to parameters input by the user. Perhaps you could explore how to draw and animate graphics on the screen. A bat and ball game would be a reasonable challenge to take on.

You could make a program that produced different types of chart (bar, line or pie).

More Complex String Processing

A hangman game would require some thought. You could store the words to use in a text file and randomly choose one for the game. You would need to be able to work closely with the strings that you were using and be confident in replacing letters within a string when they are correctly entered. The graphical part of the game could be developed separately when you have solved the string processing.

Mathematical Programs

A level mathematicians and physicists have a rich source of potential problems to solve in their courses. You can write programs that assist with trigonometry or any other set of complex calculations. The program is more useful if it shows the working required at each stage of the calculation.

For an additional challenge, produce a scale drawing of any shapes (eg triangles) on which you are performing trigonometric functions.

Getting Stuck

Getting stuck is part of the joy of programming. If you never get stuck with a problem, then it is probably too easy to solve. There are lots of ways to get help.

The help section of the Pascal program gives examples of different statements that you can use. You should be able to work out from these explanations how to use that particular statement or function.

You can also look online for examples of programs that do similar things and adapt the code to suit your own purpose. The main thing is not to give up on a problem. Learning how to overcome such difficulties is the key to being a good programmer.