Mega Code Archive

 
Categories / Delphi / Functions
 

Celsiustofahrenheit - 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 Convert Convert one measurement value to another FahrenheitToCelsius Convert a fahrenheit temperature into celsius 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