@@ -421,7 +421,7 @@ contains
421
421
type(string_type), intent(in) :: string
422
422
integer :: ich
423
423
424
- ich = merge(ichar(string%raw), 0, allocated(string%raw))
424
+ ich = merge(ichar(string%raw(1:1) ), 0, allocated(string%raw))
425
425
426
426
end function ichar_string
427
427
@@ -431,7 +431,7 @@ contains
431
431
type(string_type), intent(in) :: string
432
432
integer :: ich
433
433
434
- ich = merge(iachar(string%raw), 0, allocated(string%raw))
434
+ ich = merge(iachar(string%raw(1:1) ), 0, allocated(string%raw))
435
435
436
436
end function iachar_string
437
437
@@ -571,8 +571,11 @@ contains
571
571
logical, intent(in), optional :: back
572
572
integer :: pos
573
573
574
- pos = index(maybe(string), maybe(substring), &
575
- merge(back, .false., present(back)))
574
+ if(present(back))then
575
+ pos = index(maybe(string), maybe(substring),back)
576
+ else
577
+ pos = index(maybe(string), maybe(substring),.false.)
578
+ endif
576
579
577
580
end function index_string_string
578
581
@@ -584,8 +587,11 @@ contains
584
587
logical, intent(in), optional :: back
585
588
integer :: pos
586
589
587
- pos = index(maybe(string), substring, &
588
- merge(back, .false., present(back)))
590
+ if(present(back))then
591
+ pos = index(maybe(string), substring,back)
592
+ else
593
+ pos = index(maybe(string), substring,.false.)
594
+ endif
589
595
590
596
end function index_string_char
591
597
@@ -597,8 +603,11 @@ contains
597
603
logical, intent(in), optional :: back
598
604
integer :: pos
599
605
600
- pos = index(string, maybe(substring), &
601
- merge(back, .false., present(back)))
606
+ if(present(back))then
607
+ pos = index(string, maybe(substring),back)
608
+ else
609
+ pos = index(string, maybe(substring),.false.)
610
+ endif
602
611
603
612
end function index_char_string
604
613
@@ -612,8 +621,11 @@ contains
612
621
logical, intent(in), optional :: back
613
622
integer :: pos
614
623
615
- pos = scan(maybe(string), maybe(set), &
616
- merge(back, .false., present(back)))
624
+ if(present(back))then
625
+ pos = scan(maybe(string), maybe(set),back)
626
+ else
627
+ pos = scan(maybe(string), maybe(set),.false.)
628
+ endif
617
629
618
630
end function scan_string_string
619
631
@@ -625,8 +637,11 @@ contains
625
637
logical, intent(in), optional :: back
626
638
integer :: pos
627
639
628
- pos = scan(maybe(string), set, &
629
- merge(back, .false., present(back)))
640
+ if(present(back))then
641
+ pos = scan(maybe(string), set,back)
642
+ else
643
+ pos = scan(maybe(string), set,.false.)
644
+ endif
630
645
631
646
end function scan_string_char
632
647
@@ -638,8 +653,11 @@ contains
638
653
logical, intent(in), optional :: back
639
654
integer :: pos
640
655
641
- pos = scan(string, maybe(set), &
642
- merge(back, .false., present(back)))
656
+ if(present(back))then
657
+ pos = scan(string, maybe(set),back)
658
+ else
659
+ pos = scan(string, maybe(set),.false.)
660
+ endif
643
661
644
662
end function scan_char_string
645
663
@@ -653,8 +671,11 @@ contains
653
671
logical, intent(in), optional :: back
654
672
integer :: pos
655
673
656
- pos = verify(maybe(string), maybe(set), &
657
- merge(back, .false., present(back)))
674
+ if(present(back))then
675
+ pos = verify(maybe(string), maybe(set),back)
676
+ else
677
+ pos = verify(maybe(string), maybe(set),.false.)
678
+ endif
658
679
659
680
end function verify_string_string
660
681
@@ -667,8 +688,11 @@ contains
667
688
logical, intent(in), optional :: back
668
689
integer :: pos
669
690
670
- pos = verify(maybe(string), set, &
671
- merge(back, .false., present(back)))
691
+ if(present(back))then
692
+ pos = verify(maybe(string), set,back)
693
+ else
694
+ pos = verify(maybe(string), set,.false.)
695
+ endif
672
696
673
697
end function verify_string_char
674
698
@@ -681,8 +705,11 @@ contains
681
705
logical, intent(in), optional :: back
682
706
integer :: pos
683
707
684
- pos = verify(string, maybe(set), &
685
- merge(back, .false., present(back)))
708
+ if(present(back))then
709
+ pos = verify(string, maybe(set),back)
710
+ else
711
+ pos = verify(string, maybe(set),.false.)
712
+ endif
686
713
687
714
end function verify_char_string
688
715
0 commit comments