2

Running the Program

To run the program, enter a.out at the prompt. The output of temp.p is then displayed:

hostname% a.out

Fahrenheit Celsius

---------- -------

320.00

330.56

341.11

351.67

362.22

372.78

383.33

393.89

404.44

415.00

425.56

436.11

446.67

457.22

467.78

478.33

488.89

499.44

5010.00

Renaming the Executable File

It is inconvenient to have the result of every compilation in a file called a.out. If such a file already exists, it is overwritten. You can avoid this in either of the two following ways:

Change the name of a.out after each compilation with the mv command:

hostname% mv a.out temp

Use the compiler –ooption to name the output executable file. This example places the executable code in the file temp:

hostname% pc –o temp temp.p

Pascal Programs

9