A22.0002, Section 2

Introduction to Computers and Programming

Getting Turbo Pascal 7.0 at the PC Lab

1. From the desktop double click the Applications folder.
2. Double click the Programming folder.
3. Double click the Dos Programming Folder.
4. Double click the Turbo Pascal 7.0 for Dos folder.

The Turbo Pascal Integrated Developnment Environment (IDE) appears.

Using Turbo Pascal 7.0

1. Hit the F3 key to see files available. Either double click the file you want or type the name of a new file.
2. Type the program. Save the program by hitting F2.
3. Run the progam by hitting Alt-R.
4. To save it on your disk, Click the Change Directory option on the File menu. Then click Drives in the window that opens and then click A. Then hit Chdir and OK buttons to the right of the window. Finally hit the green dot at the upper right of the Change Directory dialog box and the box will dissapear. Now when you hit F2, your program will be saved on your floppy disk.

Printing output from the screen for Turbo Pascal at the PC lab:

1, Run the program.
2. Go to the output screen from the Debug window.
3. Hit alt-printscreen for output or shift-printscreen for whole screen. to be printed (this will copy the contents of the screen to the clipboard)
4. Go to the START icon in the Windows desk top and choose Accessories/Word Pad.
5. Go to edit and select "paste". This will paste the contents of clipboard to Word Pad
6. Go to File/Print. This will print your output.

Another method is to compile the program (using the instructions under 2.11 in the Supplement) and then redirect the output. For example, compile the programs cats.pas into cats.exe. Then run cats.exe > output1.txt and the output will be directed into the text file called output1.txt. You can then print output1.txt using Notepad or any word processor or text editor.

Notes from Sam Marateck:

Printing a program

Click the File menu bar at the top of the screen and drag the cursor to Print. A print dialog box opens indicating on which printer the page will be printed. Click the OK button to print the page.

Saving a program

Click the File menu bar at the top of the screen and drag the cursor to Save as. A Save as dialog box opens. Click the arrow to the right of the word drives and drag the mouse untill drive a: is selected. Then hit the OK button and the desired program will be saved on the disk inserted in drive a:.

If you have any questions please email me at engel@cs.nyu.edu.

Return to course home page