Loading...
Searching...
No Matches
evaluate_value

Definition

Generic interface for converting a string to a number. The interface works for integer values (single and double) and real values (single and double).

Examples

The following example demonstrates some of the methods found in the evaluate_value module.

character(:), allocatable :: numstring
integer :: val, ierr
numstring = '3'
call value(numstring, val, ierr)
if (ierr /= 0) print*, 'error: ', ierr
!val equals 3

Data Types

interface  value
 Converts string to a number. More...
 

Methods

◆ is_digit()

pure logical function, public is_digit ( character(1), intent(in) ch)

Check if a character is a digit.

Parameters
[in]chinput character
Returns
logical. .true. if the character is a digit (0,1,...,9), .false. otherwise.

Remarks

Definition at line 150 of file Value.f90.