Description |
The CelsiusToFahrenheit function converts a CelsiusValue to fahrenheit.
|
|
Related commands |
|
|
|
Example code : Convert 21 celsius to fahrenheit |
// Full Unit code. // ----------------------------------------------------------- // You must store this code in a unit called Unit1 with a form // called Form1 that has an OnCreate event called FormCreate. unit Unit1; interface uses StdConvs, // Unit containing the CelsiusToFahrenheit command Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} // Include form definitions procedure TForm1.FormCreate(Sender: TObject); var
celsius, fahrenheit : Double;
begin // Define the celsius value celsius := 21.0; // A nice warm day
// Convert to farenheit
fahrenheit := CelsiusToFahrenheit(celsius);
// Show both values
ShowMessageFmt('%f C = %f F',[celsius, fahrenheit]);
end; end.
|
Hide full unit code |
21.00 C = 69.80 F
|
|