DelphiBasics
FahrenheitToCelsius
Function
Convert a fahrenheit temperature into celsius StdConvs unit
 function FahrenheitToCelsius ( const FahrenheitValue : Double ) : Double;
Description
The FahrenheitToCelsius function converts a FahrenheitValue to celsius.
Related commands
CelsiusToFahrenheit Convert a celsius temperature into fahrenheit
Convert Convert one measurement value to another
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.




 
Example code : Convert body temperature in fahrenheit to celsius
var
  celsius, fahrenheit : Double;

begin
  // Define the fahrenheit value
  fahrenheit := 98.4;  // Human body temperature

  // Convert to celsius
  celsius := FahrenheitToCelsius(fahrenheit);

  // Show both values
  ShowMessageFmt('%f F  = %f C',[fahrenheit, celsius]);
end;
Show full unit code
   98.40 F = 36.89 C
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Home Page