@@ -7,8 +7,6 @@ module fpm_strings
7
7
public :: string_array_contains, string_cat, operator (.in .), fnv_1a
8
8
public :: resize, str
9
9
10
- integer , parameter :: dp = selected_real_kind (15 )
11
-
12
10
type string_t
13
11
character (len= :), allocatable :: s
14
12
end type
@@ -32,7 +30,7 @@ module fpm_strings
32
30
end interface str_ends_with
33
31
34
32
interface str
35
- module procedure str_int, str_int64, str_real, str_real_n, str_logical
33
+ module procedure str_int, str_int64, str_logical
36
34
end interface
37
35
38
36
contains
@@ -391,34 +389,6 @@ pure function str_int64(i) result(s)
391
389
write (s, ' (i0)' ) i
392
390
end function
393
391
394
- pure integer function str_real_len(r, fmt) result(sz)
395
- ! Returns the length of the string representation of 'i'
396
- real (dp), intent (in ) :: r
397
- character (len=* ), intent (in ) :: fmt
398
- integer , parameter :: MAX_STR = 100
399
- character (MAX_STR) :: s
400
- ! If 's' is too short (MAX_STR too small), Fortan will abort with:
401
- ! "Fortran runtime error: End of record"
402
- write (s, fmt) r
403
- sz = len_trim (s)
404
- end function
405
-
406
- pure function str_real (r ) result(s)
407
- ! Converts the real number "r" to string with 7 decimal digits.
408
- real (dp), intent (in ) :: r
409
- character (len=* ), parameter :: fmt= " (f0.6)"
410
- character (len= str_real_len(r, fmt)) :: s
411
- write (s, fmt) r
412
- end function
413
-
414
- pure function str_real_n (r , n ) result(s)
415
- ! Converts the real number "r" to string with 'n' decimal digits.
416
- real (dp), intent (in ) :: r
417
- integer , intent (in ) :: n
418
- character (len= str_real_len(r, " (f0." // str_int(n) // " )" )) :: s
419
- write (s, " (f0." // str_int(n) // " )" ) r
420
- end function
421
-
422
392
pure integer function str_logical_len(l) result(sz)
423
393
! Returns the length of the string representation of 'l'
424
394
logical , intent (in ) :: l
0 commit comments