Pascal Resources
Version used in class
Implementation: Free Pascal
Version: 1.0.10 (on Windows)
Note: While Free Pascal is available for use on a variety of Unix
systems (FreeBSD, Mac OS X, Linux),
it is not available for use on the Sun platform.
Since our Unix boxes in the CPS labs are Suns, we are unable to provide you
access to the Unix version of Free Pascal. However, we encourage you to
install and use a Unix version on your personal computer.
Using Free Pascal in the CPS Labs (Anderson 131/135)
You may invoke the Free Pascal compiler by typing fpc program.pp
at any command shell. Free Pascal is also available on the start menu
at Start -> Programs -> FreePascal, which just brings you to
a command shell at c:\temp.
Information on testing the compiler is here.
Installing Free Pascal @ Home
-
Grab the distribution from the
Free
Pascal Download Page (or
one of its mirrors).
-
Choose an appropriate operating system and follow the instructions for
installation under Windows or Linux.
The remaining instructions are for a Windows installation.
The GA or instructor can provide help with a FreeBSD, Mac OS X, or Linux
installation.
-
Select the most recent stable version (currently 10.0.10
w321010.zip)
which does not include the sources, gdb,
and the gnu utilities.
-
Save it to a temporary folder of your choice.
-
Unzip
w321010.zip in the temporary folder.
-
Launch
Install.exe.
-
The compiler installs in the directory you specify (
C:\pp by default). If you specify a different location,
please make sure that the directory name you use does not include any
spaces.
DO NOT install in C:\Program Files\pp!
-
After installation, add
C:\pp\bin\win32 to the PATH
environment variable (replace C:\pp with whatever install
location you used). For Windows 2000 and Windows XP users,
go to Start Menu -> Settings -> Control Panel -> System. Click on
the Advanced tab, then press the "Environment Variables ..." button.
Make the change under "System variables" if you want all user
accounts on your machine to have Free Pascal in their search path,
or under "User variables for ..." to affect your account only.
-
Open a command shell, and change directory to
C:\pp\demo\win32
(replace C:\pp with whatever install location you used).
-
Compile
winhello.pp,
using the command fpc winhello.pp.
-
Execute
winhello.exe to verify that your
installation is correct.
-
Contact the GA or instructor if you find errors in this procedure
or if you have difficulty installing Free Pascal using this
procedure.
Documentation
Useful Links
Books
Pick up any textbook or programming reference on Pascal at the
Roesch Library or your local library. My favorite is
Oh Pascal! by Doug Cooper and Michael J. Clancy (any edition).
- D. Cooper and M. J. Clancy.
Oh Pascal!. W. W. Norton & Company, Second edition,
1985. (the third ed., 1993 is also available).
- N. Graham. Introduction to Pascal. West Publishing Company,
1980. (newer editions are available as well).
Sample Programs
Body Mass Index Program in Pascal: bmi.pp
Body Mass Index Program in C++: bmi.cpp
|