C Library Functions - dble (3)
NAME
dble(3f) - [M_strings:TYPE] overloads DBLE(3f) so it can handle character arguments
(LICENSE:PD)
CONTENTS
Synopsis
Description
Options
Returns
Examples
Author
License
SYNOPSIS
impure elemental function dble(string)
character(len=*) :: string
integer :: dble
DESCRIPTION
dble(3f) returns a DOUBLE value when given a numeric representation of a
numeric value. This overloads the DBLE(3f) intrinsic so that CHARACTER
arguments assumed to represent a numeric value may be input.
OPTIONS
|
STRING |
input string to be converted to a dble value
|
|
RETURNS
|
DBLE |
double precision value represented by input string
|
|
EXAMPLES
Sample program:
program demo_dble
use M_strings, only: dble
implicit none
write(*,*)dble(100),dble(20.4)
write(*,*)dble still works,dble(20),dble(20.4)
write(*,*)elemental,&
& dble([character(len=23) :: 10,20.3,20.5,20.6])
end program demo_dble
Results:
> 100.00000000000000 20.399999999999999
> dble still works 20.000000000000000 20.399999618530273
> elemental 10.00000000000000 20.30000000000000
> 20.50000000000000 20.60000000000000
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | dble (3) | June 29, 2025 |
Generated by manServer 1.08 from bdc9440f-a653-42d4-9ca8-2353f05a1e5f using man macros.