[UP]


Manual Reference Pages  - c2f (3)

NAME

c2f(3f) - [M_units:TEMPERATURE] convert Celsius to Fahrenheit (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example
Author
License

SYNOPSIS

elemental real function c2f(celsius)

    class(*),intent(in) :: celsius

DESCRIPTION

Converts Celsius temperatures to Fahrenheit using the formula:

    fahrenheit=(celsius+40.0)*9.0/5.0 - 40.0

OPTIONS

celsius
  any standard scalar value supported by anyscalar_to_real(3f).

EXAMPLE

Sample program

   program demo_c2f
   use M_units, only : c2f
   implicit none
      write(*,*)’With REAL array input    ’, c2f([ -40.0, 0.0, 100.0 ])
      write(*,*)’With INTEGER array input ’, c2f([ -40,   0,   100   ])
      write(*,*)’With DOUBLEPRECISION     ’, c2f(-40.0d0),c2f(0.0d0),c2f(100.0d0)
   end program demo_c2f

Results

   With REAL array input      -40.0000000       32.0000000       212.000000
   With INTEGER array input   -40.0000000       32.0000000       212.000000
   With DOUBLEPRECISION       -40.0000000       32.0000000       212.000000

AUTHOR

John S. Urban

LICENSE

Public Domain


c2f (3) October 17, 2020
Generated by manServer 1.08 from df3f7c9e-93b1-4fb3-a495-66e36011ce26 using man macros.