[UP]


Manual Reference Pages  - dnum0 (3)

NAME

dnum0(3f) - [M_calculator] return double precision value from string expression using calculator(3f) (LICENSE:PD)

CONTENTS

Synopsis
Description
Examples
See Also
Author
License

SYNOPSIS

doubleprecision function dnum0(inline,ierr)

   character(len=*),intent(in) :: inline
   integer,optional,intent(out) :: ierr

DESCRIPTION

DNUM0() is used to return a DOUBLEPRECISION value from a CHARACTER string representing a numeric expression.
o If an error occurs in evaluating the expression INUM() returns zero(0).
o DNUM0() ultimately uses the calculator routine CALCULATOR(3f)
inline INLINE is a CHARACTER variable up to (iclen_calc=255) characters long that is similar to a FORTRAN 77 numeric expression.
ierr error code. If zero, no error occurred

EXAMPLES

Sample Program

    program demo_dnum0
    use M_calculator, only : dnum0
    doubleprecision x,y,z
    X=DNUM0(’20/3.4’)
    Y=DNUM0(’CI = 10 * sin(3.1416/4)’)
    Z=DNUM0(’CI’)
    write(*,*)x,y,z
    end program demo_dnum0

SEE ALSO

o The syntax of an expression is as described in the main documentation of the Calculator Library.
o See EXPRESSION(), CALCULATOR(), STRGAR2(), RNUM0(), SNUM0().

AUTHOR

John S. Urban

LICENSE

Public Domain


dnum0 (3) October 17, 2020
Generated by manServer 1.08 from 62e23dbf-edb8-4fbe-9eb7-4efb56653475 using man macros.