A number of implementations of Object Pascal exist as well as a number of different dialects for the language itself. We use the Delphi/Free Pascal dialect in this book. Delphi is a commercial implementation although student versions can sometimes be purchased at reduced prices. Free Pascal is as the name states both free as in price and free as in open source. For these reasons we recommend using the Free Pascal compiler. Most modern compilers are packaged in what are known as Integrated Development Environments (IDE). These environments provide features such as syntax highlighting, one-click compiling, and step-through-code debugging to name a few. We recommend using the Lazarus IDE which contains the Free Pascal Compiler. Follow these instructions to install Lazarus on your machine:

1. While the latest version of the Lazarus IDE can be downloaded from Source Forge, we recommend using version 0.9.28.2 (a direct link is provided below). One warning about these links is that SourceForge often has annoying ads that may ask you to fill out registration information. You DO NOT need to do this. The download should start immediately from these links. If it does not there is usually a link on the page that is a manual download link, but you shouldn't have to enter any information in order to download lazarus.

Lazarus runs on a wide number of systems so you will need to know exactly what platform you have in order to download the right installer. Most Windows computers are 32-bit. If you are running Windows XP, right click on My Computer and select Properties. On the "General" tab, if the operating system is Windows XP and nothing is specified then it is 32-bit. Otherwise, Windows XP x64 will be displayed. For Windows Vista and Windows 7, click the Start Menu and type system in the Start Search box. The operating system type should be listed under System. Lazarus should work under XP, Vista, and Windows 7 with the same installer as long as you make sure you get the 32 or 64-bit part correct:

Click here to Download Lazarus 0.9.28.2 for Win32

Click here to Download Lazarus 0.9.28.2 for Win64

If these links do not work automatically, then go to this directory and find the correct version manually:

Lazarus Project Directory

Make sure you know where the file is downloaded to on your computer so you can open it in the next step.

3. Open the installer and follow the instructions provided. Note that you should be logged in with an administrative account in order to install Lazarus without encountering any bugs. Accept all of the default directories options and file associations by just clicking "Next" on each screen and then "Install". The installation process will take several minutes.
4. When installation is complete, download this file and unzip it onto your desktop (or any other location where you would like to store your files). DO NOT simply press Unzip or the folder will go into your TEMP directory and (effectively) be lost. You must set the directory using Browse (just use the desktop if you don't have a preference):
The unzipped directory contains the basic files you will need to get started. You will also place all project files you create in this directory.

5. To test your Lazarus installation, open the folder GettingStarted in Unit 1 of the Introduction_to_Computer_Programming directory. Double click on either GettingStarted.lpr or GettingStarted.lpi (both do the same thing). The first thing you probably want to do is change some of the environment options. Automatic backup files are optional but often get in the way so we can stop automatic backups by selecting Environment -> Options on the main menu. The window that opens should look something like the window below. You should select Backup under Environment. On both the project files and other files sections you should change the value from backup to (no subdirectory) and the type from User defined to No backup files. 
Next you should select Colors under Editor. This will allow us to adjust the syntax highlighting to the highlighting theme that is used in this book. Use the following table to adjust each component of the language to the right color and style:
Object Pascal
Foreground
Style
Assembler
Green
Bold
Comment
Navy
Italic
Directive
Navy
Bold
Identifier
Black
None
Number
Red
None
Reserved word
Maroon
Bold
String
Blue
None
Symbol
Black
None
If all of this was done correctly, the editor should look like this:
Finally, we can disable Code Folding under Editor by unchecking the Code folding box since we will not use code folding in this unit.

6. To ensure that all is well. Click the green triangle button below the main menu or press F9 assuming you are using the default key shortcut mappings. A console window should appear with the following lines:

Welcome to Object Pascal in Lazarus! The answer to life, the universe, and everything = 42

If this works you should be able to return to Chapter 1 and continue from where you left off. If any of these steps fails you should review these instructions to make sure all steps were taken correctly. If the issue seems to be with the installation of FreePascal then refer to the contact email address on FreeText.org for help.