next up previous contents
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):

  1. 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''.
  2. click the ``Advanced'' tab
  3. click the ``Environment Variables'' button (near the bottom)
  4. select ``PATH'' from the variables
  5. click ``Edit'' to change it
  6. append (add to the end) ;C:\pp\bin\win32 to the original setting. Be sure to include the semicolon!
  7. 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:

  1. 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
  2. open one more DOS box if you us a DOS-type editor (such as the built-in edit), otherwise, start a notepad
  3. 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.
  4. 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 up previous contents
Next: Alternative Method to Invoke Up: Tools for Programming in Previous: Your First Program   Contents
Tak Auyeung 2003-12-03