10 lines
210 B
FortranFixed
10 lines
210 B
FortranFixed
|
|
FUNCTION is_numeric(string)
|
||
|
|
IMPLICIT NONE
|
||
|
|
CHARACTER(len=*), INTENT(IN) :: string
|
||
|
|
LOGICAL :: is_numeric
|
||
|
|
REAL :: x
|
||
|
|
INTEGER :: e
|
||
|
|
READ(string,*,IOSTAT=e) x
|
||
|
|
is_numeric = e == 0
|
||
|
|
END FUNCTION is_numeric
|