2
Compiling the Program
8
program temperature(output) ;
{ Program to convert temperatures from
Fahrenheit to Celsius. }
const
MIN = 32 ;
MAX = 50 ;
CONVERT = 5 / 9 ;
var
fahren: integer ;
celsius: real ;
begin
writeln('Fahrenheit
writeln('----------
for fahren := MIN to MAX do begin
celsius := CONVERT * (fahren - 32) ;
writeln(fahren: 5, celsius: 18: 2) ;
end ;
end.
Now compile the program with pc, the Pascal compiler, by typing at the
system prompt:
hostname% pc temp.p
Pascal names the compiled version of the program a.out by default.
Pascal 4.0 User's Guide
Celsius') ;
-------') ;
Need help?
Do you have a question about the SunSoft Pascal 4.0 and is the answer not in the manual?
Questions and answers