[UP]


Manual Reference Pages  - feet_to_meters (3)

NAME

feet_to_meters(3f) - [M_units:LENGTH] converts a measurement in feet to meters (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example
Author
License

SYNOPSIS

elemental doubleprecision function feet_to_meters(feet)

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

DESCRIPTION

Converts feet to meters using the formula:

    meters = 0.0254 * 12.0 * feet

OPTIONS

feet any standard scalar value supported by anyscalar_to_real(3f). This at least includes REAL, INTEGER, and DOUBLEPRECISION.

EXAMPLE

Sample program

   program demo_feet_to_meters
   use M_units, only : feet_to_meters
   implicit none
      write(*,*)’With REAL array input    ’, &
              & feet_to_meters([ -1.0, 0.0, 1.0 ,1.0/12.0])
      write(*,*)’With INTEGER array input ’, &
              & feet_to_meters([ -1,   0,   1   ])
      write(*,*)’With DOUBLEPRECISION     ’, &
              & feet_to_meters(-1.0d0), &
              & feet_to_meters(0.0d0), &
              & feet_to_meters(1.0d0)
   end program demo_feet_to_meters

Results

    With REAL array input     -0.304800004   0.00000000  0.304800004  2.54000016E-02
    With INTEGER array input  -0.304800004   0.00000000  0.304800004
    With DOUBLEPRECISION      -0.304800004   0.00000000  0.304800004

AUTHOR

John S. Urban

LICENSE

Public Domain


feet_to_meters (3) October 17, 2020
Generated by manServer 1.08 from 1c061ac9-c854-4fbf-85ef-db34dfa09ed2 using man macros.