Skip to content

Commit ad6cd9a

Browse files
authored
Update stdlib_str2num.fypp
Avoid xdp for to_num_base while an implementation is not decided
1 parent 327a84f commit ad6cd9a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/stdlib_str2num.fypp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,25 @@ module stdlib_str2num
4444

4545
interface to_num
4646
#:for k1, t1 in (INT_KINDS_TYPES + REAL_KINDS_TYPES)
47+
#:if k1 != "xdp"
4748
module procedure to_${k1}$
49+
#:endif
4850
#:endfor
4951
end interface
5052

5153
interface to_num_p
5254
#:for k1, t1 in (INT_KINDS_TYPES + REAL_KINDS_TYPES)
55+
#:if k1 != "xdp"
5356
module procedure to_${k1}$_p
57+
#:endif
5458
#:endfor
5559
end interface
5660

5761
interface to_num_base
5862
#:for k1, t1 in (INT_KINDS_TYPES + REAL_KINDS_TYPES)
63+
#:if k1 != "xdp"
5964
module procedure to_${k1}$_base
65+
#:endif
6066
#:endfor
6167
end interface
6268

@@ -67,6 +73,7 @@ module stdlib_str2num
6773
!---------------------------------------------
6874

6975
#:for k1, t1 in (INT_KINDS_TYPES + REAL_KINDS_TYPES)
76+
#:if k1 != "xdp"
7077
elemental function to_${k1}$(s,mold) result(v)
7178
! -- In/out Variables
7279
character(*), intent(in) :: s !> input string
@@ -95,12 +102,14 @@ module stdlib_str2num
95102
if(present(stat)) stat = err
96103
end function
97104

105+
#:endif
98106
#:endfor
99107
!---------------------------------------------
100108
! String To Number Implementations
101109
!---------------------------------------------
102110

103111
#:for k1, t1 in INT_KINDS_TYPES
112+
#:if k1 != "xdp"
104113
elemental subroutine to_${k1}$_base(s,v,p,stat)
105114
!> Return an unsigned 32-bit integer
106115
! -- In/out Variables
@@ -128,6 +137,7 @@ module stdlib_str2num
128137
stat = 0
129138
end subroutine
130139

140+
#:endif
131141
#:endfor
132142

133143
elemental subroutine to_sp_base(s,v,p,stat)
@@ -322,7 +332,7 @@ module stdlib_str2num
322332
end subroutine
323333

324334
#:if WITH_QP
325-
subroutine to_qp_base(s,v,p,stat)
335+
elemental subroutine to_qp_base(s,v,p,stat)
326336
integer, parameter :: wp = qp
327337
!> Sequentially unroll the character and get the sub integers composing the whole number, fraction and exponent
328338
! -- In/out Variables

0 commit comments

Comments
 (0)