Next: Alternative Method to Invoke
Up: Tools for Programming in
Previous: Your First Program
Contents
Command Line Interface
Some of you may have difficulties getting the IDE (integrated development
environment) working, especially in Windows XP. This is not a big problem.
FreePascal is distributed with a command line compiler that is very
easy to use, and that works in Windows XP just fine.
You do need your own text editor for editing the program. You can use
the built-in DOS editor edit or the Windows editor
notepad. You can also download a free DOS editor with syntax
highlighting from
http://setedit.sourceforge.net.
In order for this to work, you need to add the path to FreePascal to your
system path. Follow these steps (only need to do this once):
- Using the Classic View, click the ``Start'' button, then ``Control
Panel'', then ``System''. If you are using the category view,
click the ``Start'' button, ``Control Panel'', ``Performance and
Maintenance'', then ``System''.
- click the ``Advanced'' tab
- click the ``Environment Variables'' button (near the bottom)
- select ``PATH'' from the variables
- click ``Edit'' to change it
- append (add to the end)
;C:\pp\bin\win32 to the
original setting. Be sure to include the semicolon!
- click ``OK'' when you are done
After this step, Windows XP knows where to find the command line
compiler. You can use a similar trick to add the path to your
favorite editor.
When you do your homework assignment, do the following:
- open a DOS box by clicking the ``Start'' button, select
``run...'', then specify command, and press
ENTER, change to the directory (use the command
cd) where your Pascal files are located
- open one more DOS box if you us a DOS-type editor (such as
the built-in edit), otherwise, start a notepad
- in the first DOS box, type
ppc386 test.pas
to compile a program, then type
test
to run the compiled program. Replace test with the
name of your program.
- if the compiler complains, switch to the editor to edit the
Pascal program, make sure you save it first, then repeat the
compilation step
Next: Alternative Method to Invoke
Up: Tools for Programming in
Previous: Your First Program
Contents
Tak Auyeung
2003-12-03