DelphiBasics
CelsiusToFahrenheit
Function
Convert a celsius temperature into fahrenheit StdConvs unit
 function CelsiusToFahrenheit(const CelsiusValue Double):Double;
Description
The CelsiusToFahrenheit function converts a CelsiusValue to fahrenheit.
Related commands
ConvertConvert one measurement value to another
FahrenheitToCelsiusConvert a fahrenheit temperature into celsius
 Download this web site as a Windows program.




 
Example code : Convert 21 celsius to fahrenheit
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;
Show full unit code
  21.00 C = 69.80 F
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page