Skip to content

Commit 3b50f6a

Browse files
committed
add some white spaces
1 parent fa8bdad commit 3b50f6a

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/stdlib_str2num.fypp

+18-18
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ module stdlib_str2num
111111

112112
#:for k1, t1 in INT_KINDS_TYPES
113113
elemental subroutine to_${k1}$_base(s,v,p,stat)
114-
!> Return an unsigned 32-bit integer
114+
!> Return an ${k1}$ integer
115115
! -- In/out Variables
116116
character(*), intent(in) :: s !> input string
117117
${t1}$, intent(out) :: v !> Output real value
@@ -128,7 +128,7 @@ module stdlib_str2num
128128
v = 0
129129
do while( p<=len(s) )
130130
val = iachar(s(p:p))-digit_0
131-
if( val >= 0 .and. val <= 9) then
131+
if( val >= 0 .and. val <= 9 ) then
132132
v = v*10 + val
133133
p = p + 1
134134
else
@@ -224,7 +224,7 @@ module stdlib_str2num
224224
i_exp = 0
225225
do while( p<=len(s) )
226226
val = iachar(s(p:p))-digit_0
227-
if( val >= 0 .and. val <= 9) then
227+
if( val >= 0 .and. val <= 9 ) then
228228
i_exp = i_exp*10_int8 + val
229229
p = p + 1
230230
else
@@ -233,7 +233,7 @@ module stdlib_str2num
233233
end do
234234

235235
exp_aux = nwnb-1+resp-sige*i_exp
236-
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb) then
236+
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb ) then
237237
v = sign*int_wp*expbase(exp_aux)
238238
else
239239
v = sign*int_wp*10._dp**(sige*i_exp-resp+1)
@@ -322,7 +322,7 @@ module stdlib_str2num
322322
i_exp = 0
323323
do while( p<=len(s) )
324324
val = iachar(s(p:p))-digit_0
325-
if( val >= 0 .and. val <= 9) then
325+
if( val >= 0 .and. val <= 9 ) then
326326
i_exp = i_exp*10_int8 + val
327327
p = p + 1
328328
else
@@ -331,7 +331,7 @@ module stdlib_str2num
331331
end do
332332

333333
exp_aux = nwnb-1+resp-sige*i_exp
334-
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb) then
334+
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb ) then
335335
v = sign*int_wp*expbase(exp_aux)
336336
else
337337
v = sign*int_wp*10._wp**(sige*i_exp-resp+1)
@@ -393,9 +393,9 @@ module stdlib_str2num
393393
val = iachar(s(i:i))-digit_0
394394
if( val >= 0 .and. val <= 9 ) then
395395
icount = icount + 1
396-
if(icount<=maxdpt)then
396+
if( icount<=maxdpt ) then
397397
int_dp1 = int_dp1*10 + val
398-
else if(icount<2*maxdpt)then
398+
else if( icount<2*maxdpt ) then
399399
int_dp2 = int_dp2*10 + val
400400
end if
401401
else if( val == period ) then
@@ -430,7 +430,7 @@ module stdlib_str2num
430430
i_exp = 0
431431
do while( p<=len(s) )
432432
val = iachar(s(p:p))-digit_0
433-
if( val >= 0 .and. val <= 9) then
433+
if( val >= 0 .and. val <= 9 ) then
434434
i_exp = i_exp*10_int8 + val
435435
p = p + 1
436436
else
@@ -439,8 +439,8 @@ module stdlib_str2num
439439
end do
440440

441441
exp_aux = nwnb-1+resp-sige*i_exp
442-
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb) then
443-
if(icount<=maxdpt)then
442+
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb ) then
443+
if( icount<=maxdpt ) then
444444
v = sign*int_dp1*expbase(exp_aux)
445445
else
446446
v = sign*(int_dp1 + int_dp2*fractional_base(maxdpt-1))*expbase(exp_aux-icount+maxdpt)
@@ -506,9 +506,9 @@ module stdlib_str2num
506506
val = iachar(s(i:i))-digit_0
507507
if( val >= 0 .and. val <= 9 ) then
508508
icount = icount + 1
509-
if(icount<=maxdpt)then
509+
if( icount<=maxdpt ) then
510510
int_dp1 = int_dp1*10 + val
511-
else if(icount<2*maxdpt)then
511+
else if( icount<2*maxdpt ) then
512512
int_dp2 = int_dp2*10 + val
513513
end if
514514
else if( val == period ) then
@@ -543,7 +543,7 @@ module stdlib_str2num
543543
i_exp = 0
544544
do while( p<=len(s) )
545545
val = iachar(s(p:p))-digit_0
546-
if( val >= 0 .and. val <= 9) then
546+
if( val >= 0 .and. val <= 9 ) then
547547
i_exp = i_exp*10_int8 + val
548548
p = p + 1
549549
else
@@ -552,8 +552,8 @@ module stdlib_str2num
552552
end do
553553

554554
exp_aux = nwnb-1+resp-sige*i_exp
555-
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb) then
556-
if(icount<=maxdpt)then
555+
if( exp_aux>0 .and. exp_aux<=nwnb+nfnb ) then
556+
if( icount<=maxdpt ) then
557557
v = sign*int_dp1*expbase(exp_aux)
558558
else
559559
v = sign*(int_dp1 + int_dp2*fractional_base(maxdpt-1))*expbase(exp_aux-icount+maxdpt)
@@ -575,7 +575,7 @@ module stdlib_str2num
575575
integer(int8) :: p !> position
576576
!----------------------------------------------
577577
p = 1
578-
do while( p<len(s) .and. (iachar(s(p:p))==WS.or.iachar(s(p:p))==LF.or.iachar(s(p:p))==CR) )
578+
do while( p<len(s) .and. (iachar(s(p:p))==WS .or. iachar(s(p:p))==LF .or. iachar(s(p:p))==CR) )
579579
p = p + 1
580580
end do
581581
end function
@@ -586,7 +586,7 @@ module stdlib_str2num
586586
integer(int8) :: p !> position
587587
!----------------------------------------------
588588
p = 1
589-
do while( p<len(s) .and. .not.(iachar(s(p:p))==WS.or.iachar(s(p:p))==LF.or.iachar(s(p:p))==CR) )
589+
do while( p<len(s) .and. .not.(iachar(s(p:p))==WS .or. iachar(s(p:p))==LF .or. iachar(s(p:p))==CR) )
590590
p = p + 1
591591
end do
592592
end function

0 commit comments

Comments
 (0)