C Library Functions - 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
| Nemo Release 3.1 | feet_to_meters (3) | June 29, 2025 |
Generated by manServer 1.08 from e898f526-91cb-43e3-ade8-a544d5200f0a using man macros.