Lahey/Fujitsu Fortran

DBLE Function

Description

The DBLE function returns a double-precision REAL value given a numeric argument.

Syntax

DBLE (a)

Arguments

a is an INTENT(IN) scalar or array of type INTEGER, REAL or COMPLEX.

Result

The result is of double-precision REAL type. Its value is a double precision representation of a. If a is of type COMPLEX, the result is a double precision representation of the real part of a.

Example

integer :: i=1 real :: r=1. complex :: q=(1.,1.) write(*,*) i,dble(i) write(*,*) r,dble(r) write(*,*) q,dble(q)