Changeset 5117 for LMDZ6/branches/Amaury_dev/libf/misc/lmdz_strings.f90
- Timestamp:
- Jul 24, 2024, 4:23:34 PM (2 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/misc/lmdz_strings.f90
r5116 r5117 1 MODULE strings_mod1 MODULE lmdz_strings 2 2 IMPLICIT NONE; PRIVATE 3 3 PUBLIC :: maxlen, init_printout, msg, fmsg, get_in, lunout, prt_level … … 163 163 !=== Lower/upper case conversion function. ==================================================================================== 164 164 !============================================================================================================================== 165 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION strLower(str) RESULT( out)165 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION strLower(str) RESULT(OUT) 166 166 CHARACTER(LEN=*), INTENT(IN) :: str 167 167 INTEGER :: k … … 172 172 END FUNCTION strLower 173 173 !============================================================================================================================== 174 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION strUpper(str) RESULT( out)174 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION strUpper(str) RESULT(OUT) 175 175 CHARACTER(LEN=*), INTENT(IN) :: str 176 176 INTEGER :: k … … 189 189 !=== * strHead(..,.TRUE.) = 'a_b' ${str%$sep*} ================ 190 190 !============================================================================================================================== 191 CHARACTER(LEN=maxlen) FUNCTION strHead_1(str, sep, lBackward) RESULT( out)191 CHARACTER(LEN=maxlen) FUNCTION strHead_1(str, sep, lBackward) RESULT(OUT) 192 192 CHARACTER(LEN=*), INTENT(IN) :: str 193 193 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep … … 204 204 END FUNCTION strHead_1 205 205 !============================================================================================================================== 206 FUNCTION strHead_m(str, sep, lBackward) RESULT( out)206 FUNCTION strHead_m(str, sep, lBackward) RESULT(OUT) 207 207 CHARACTER(LEN=maxlen), ALLOCATABLE :: out(:) 208 208 CHARACTER(LEN=*), INTENT(IN) :: str(:) … … 225 225 !=== * strTail(str, '_', .TRUE.) = 'c' ${str##*$sep} ================ 226 226 !============================================================================================================================== 227 CHARACTER(LEN=maxlen) FUNCTION strTail_1(str, sep, lBackWard) RESULT( out)227 CHARACTER(LEN=maxlen) FUNCTION strTail_1(str, sep, lBackWard) RESULT(OUT) 228 228 CHARACTER(LEN=*), INTENT(IN) :: str 229 229 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep … … 240 240 END FUNCTION strTail_1 241 241 !============================================================================================================================== 242 FUNCTION strTail_m(str, sep, lBackWard) RESULT( out)242 FUNCTION strTail_m(str, sep, lBackWard) RESULT(OUT) 243 243 CHARACTER(LEN=maxlen), ALLOCATABLE :: out(:) 244 244 CHARACTER(LEN=*), INTENT(IN) :: str(:) … … 261 261 !=== Concatenates the strings "str(:)" with separator "sep" into a single string using a separator (',' by default). ========== 262 262 !============================================================================================================================== 263 FUNCTION strStack(str, sep, mask) RESULT( out)263 FUNCTION strStack(str, sep, mask) RESULT(OUT) 264 264 CHARACTER(LEN=:), ALLOCATABLE :: out 265 265 CHARACTER(LEN=*), INTENT(IN) :: str(:) … … 274 274 IF(ALL(.NOT.mask)) THEN; out = ''; RETURN; END IF 275 275 i0 = 0; DO WHILE(.NOT.mask(i0+1)); i0 = i0+1; END DO 276 out = str(i0); DO is=i0+1,SIZE(str, DIM=1); IF(.NOT.mask(is)) CYCLE; out = TRIM( out)//s//TRIM(str(is)); END DO276 out = str(i0); DO is=i0+1,SIZE(str, DIM=1); IF(.NOT.mask(is)) CYCLE; out = TRIM(OUT)//s//TRIM(str(is)); END DO 277 277 ELSE 278 out = str(1); DO is=2,SIZE(str, DIM=1); out = TRIM( out)//s//TRIM(str(is)); END DO278 out = str(1); DO is=2,SIZE(str, DIM=1); out = TRIM(OUT)//s//TRIM(str(is)); END DO 279 279 END IF 280 280 END FUNCTION strStack … … 282 282 !=== Concatenate the strings "str(:)" with separator "sep" into one or several lines of "nmax" characters max (for display) === 283 283 !============================================================================================================================== 284 FUNCTION strStackm(str, sep, nmax) RESULT( out)284 FUNCTION strStackm(str, sep, nmax) RESULT(OUT) 285 285 CHARACTER(LEN=maxlen), ALLOCATABLE :: out(:) 286 286 CHARACTER(LEN=*), INTENT(IN) :: str(:) … … 382 382 !=== OPTIONALY: GET THE NUMBER OF FOUND ELEMENTS "n". NB: UNFOUND => INDEX=0 ============================ 383 383 !============================================================================================================================== 384 INTEGER FUNCTION strIdx_1(str, s) RESULT( out)384 INTEGER FUNCTION strIdx_1(str, s) RESULT(OUT) 385 385 CHARACTER(LEN=*), INTENT(IN) :: str(:), s 386 DO out = 1, SIZE(str); IF(str( out) == s) EXIT; END DO386 DO out = 1, SIZE(str); IF(str(OUT) == s) EXIT; END DO 387 387 IF(out == 1+SIZE(str) .OR. SIZE(str)==0) out = 0 388 388 END FUNCTION strIdx_1 389 389 !============================================================================================================================== 390 FUNCTION strIdx_m(str, s, n) RESULT( out)390 FUNCTION strIdx_m(str, s, n) RESULT(OUT) 391 391 CHARACTER(LEN=*), INTENT(IN) :: str(:), s(:) 392 392 INTEGER, OPTIONAL, INTENT(OUT) :: n … … 403 403 !=== GET THE INDEX LIST OF THE ELEMENTS OF "str(:)" EQUAL TO "s" AND OPTIONALY, ITS LENGTH "n" ================================ 404 404 !============================================================================================================================== 405 FUNCTION strFind_1(str, s, n) RESULT( out)405 FUNCTION strFind_1(str, s, n) RESULT(OUT) 406 406 CHARACTER(LEN=*), INTENT(IN) :: str(:), s 407 407 INTEGER, OPTIONAL, INTENT(OUT) :: n … … 413 413 END FUNCTION strFind_1 414 414 !============================================================================================================================== 415 FUNCTION strFind_m(str, s, n) RESULT( out)415 FUNCTION strFind_m(str, s, n) RESULT(OUT) 416 416 CHARACTER(LEN=*), INTENT(IN) :: str(:), s(:) 417 417 INTEGER, OPTIONAL, INTENT(OUT) :: n … … 423 423 END FUNCTION strFind_m 424 424 !============================================================================================================================== 425 FUNCTION intFind_1(i,j,n) RESULT( out)425 FUNCTION intFind_1(i,j,n) RESULT(OUT) 426 426 INTEGER, INTENT(IN) :: i(:), j 427 427 INTEGER, OPTIONAL, INTENT(OUT) :: n … … 433 433 END FUNCTION intFind_1 434 434 !============================================================================================================================== 435 FUNCTION intFind_m(i,j,n) RESULT( out)435 FUNCTION intFind_m(i,j,n) RESULT(OUT) 436 436 INTEGER, INTENT(IN) :: i(:), j(:) 437 437 INTEGER, OPTIONAL, INTENT(OUT) :: n … … 443 443 END FUNCTION intFind_m 444 444 !============================================================================================================================== 445 FUNCTION booFind(l,n) RESULT( out)445 FUNCTION booFind(l,n) RESULT(OUT) 446 446 LOGICAL, INTENT(IN) :: l(:) 447 447 INTEGER, OPTIONAL, INTENT(OUT) :: n … … 738 738 !=== Contatenate horizontally scalars/vectors of strings/integers/reals into a vector/array =================================== 739 739 !============================================================================================================================== 740 FUNCTION horzcat_s00(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT( out)740 FUNCTION horzcat_s00(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT(OUT) 741 741 CHARACTER(LEN=*), INTENT(IN) :: s0 742 742 CHARACTER(LEN=*), OPTIONAL, TARGET, INTENT(IN) :: s1, s2, s3, s4, s5, s6, s7, s8, s9 … … 759 759 END FUNCTION horzcat_s00 760 760 !============================================================================================================================== 761 FUNCTION horzcat_s10(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT( out)761 FUNCTION horzcat_s10(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT(OUT) 762 762 CHARACTER(LEN=*), INTENT(IN) :: s0(:), s1 763 763 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: s2, s3, s4, s5, s6, s7, s8, s9 … … 770 770 END FUNCTION horzcat_s10 771 771 !============================================================================================================================== 772 FUNCTION horzcat_s11(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT( out)772 FUNCTION horzcat_s11(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT(OUT) 773 773 CHARACTER(LEN=*), INTENT(IN) :: s0(:) 774 774 CHARACTER(LEN=*), OPTIONAL, TARGET, INTENT(IN) :: s1(:), s2(:), s3(:), s4(:), s5(:), s6(:), s7(:), s8(:), s9(:) … … 794 794 END FUNCTION horzcat_s11 795 795 !============================================================================================================================== 796 FUNCTION horzcat_s21(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT( out)796 FUNCTION horzcat_s21(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9) RESULT(OUT) 797 797 CHARACTER(LEN=*), INTENT(IN) :: s0(:,:), s1(:) 798 798 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: s2(:), s3(:), s4(:), s5(:), s6(:), s7(:), s8(:), s9(:) … … 805 805 END FUNCTION horzcat_s21 806 806 !============================================================================================================================== 807 FUNCTION horzcat_i00(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT( out)807 FUNCTION horzcat_i00(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT(OUT) 808 808 INTEGER, INTENT(IN) :: i0 809 809 INTEGER, OPTIONAL, TARGET, INTENT(IN) :: i1, i2, i3, i4, i5, i6, i7, i8, i9 … … 826 826 END FUNCTION horzcat_i00 827 827 !============================================================================================================================== 828 FUNCTION horzcat_i10(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT( out)828 FUNCTION horzcat_i10(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT(OUT) 829 829 INTEGER, INTENT(IN) :: i0(:), i1 830 830 INTEGER, OPTIONAL, INTENT(IN) :: i2, i3, i4, i5, i6, i7, i8, i9 … … 837 837 END FUNCTION horzcat_i10 838 838 !============================================================================================================================== 839 FUNCTION horzcat_i11(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT( out)839 FUNCTION horzcat_i11(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT(OUT) 840 840 INTEGER, INTENT(IN) :: i0(:) 841 841 INTEGER, OPTIONAL, TARGET, INTENT(IN) :: i1(:), i2(:), i3(:), i4(:), i5(:), i6(:), i7(:), i8(:), i9(:) … … 861 861 END FUNCTION horzcat_i11 862 862 !============================================================================================================================== 863 FUNCTION horzcat_i21(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT( out)863 FUNCTION horzcat_i21(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9) RESULT(OUT) 864 864 INTEGER, INTENT(IN) :: i0(:,:), i1(:) 865 865 INTEGER, OPTIONAL, INTENT(IN) :: i2(:), i3(:), i4(:), i5(:), i6(:), i7(:), i8(:), i9(:) … … 872 872 END FUNCTION horzcat_i21 873 873 !============================================================================================================================== 874 FUNCTION horzcat_r00(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT( out)874 FUNCTION horzcat_r00(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT(OUT) 875 875 REAL, INTENT(IN) :: r0 876 876 REAL, OPTIONAL, TARGET, INTENT(IN) :: r1, r2, r3, r4, r5, r6, r7, r8, r9 … … 893 893 END FUNCTION horzcat_r00 894 894 !============================================================================================================================== 895 FUNCTION horzcat_r10(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT( out)895 FUNCTION horzcat_r10(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT(OUT) 896 896 REAL, INTENT(IN) :: r0(:), r1 897 897 REAL, OPTIONAL, INTENT(IN) :: r2, r3, r4, r5, r6, r7, r8, r9 … … 904 904 END FUNCTION horzcat_r10 905 905 !============================================================================================================================== 906 FUNCTION horzcat_r11(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT( out)906 FUNCTION horzcat_r11(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT(OUT) 907 907 REAL, INTENT(IN) :: r0(:) 908 908 REAL, OPTIONAL, TARGET, INTENT(IN) :: r1(:), r2(:), r3(:), r4(:), r5(:), r6(:), r7(:), r8(:), r9(:) … … 928 928 END FUNCTION horzcat_r11 929 929 !============================================================================================================================== 930 FUNCTION horzcat_r21(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT( out)930 FUNCTION horzcat_r21(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) RESULT(OUT) 931 931 REAL, INTENT(IN) :: r0(:,:), r1(:) 932 932 REAL, OPTIONAL, INTENT(IN) :: r2(:), r3(:), r4(:), r5(:), r6(:), r7(:), r8(:), r9(:) … … 939 939 END FUNCTION horzcat_r21 940 940 !============================================================================================================================== 941 FUNCTION horzcat_d00(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT( out)941 FUNCTION horzcat_d00(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT(OUT) 942 942 DOUBLE PRECISION, INTENT(IN) :: d0 943 943 DOUBLE PRECISION, OPTIONAL, TARGET, INTENT(IN) :: d1, d2, d3, d4, d5, d6, d7, d8, d9 … … 960 960 END FUNCTION horzcat_d00 961 961 !============================================================================================================================== 962 FUNCTION horzcat_d10(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT( out)962 FUNCTION horzcat_d10(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT(OUT) 963 963 DOUBLE PRECISION, INTENT(IN) :: d0(:), d1 964 964 DOUBLE PRECISION, OPTIONAL, INTENT(IN) :: d2, d3, d4, d5, d6, d7, d8, d9 … … 971 971 END FUNCTION horzcat_d10 972 972 !============================================================================================================================== 973 FUNCTION horzcat_d11(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT( out)973 FUNCTION horzcat_d11(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT(OUT) 974 974 DOUBLE PRECISION, INTENT(IN) :: d0(:) 975 975 DOUBLE PRECISION, OPTIONAL, TARGET, INTENT(IN) :: d1(:), d2(:), d3(:), d4(:), d5(:), d6(:), d7(:), d8(:), d9(:) … … 994 994 END FUNCTION horzcat_d11 995 995 !============================================================================================================================== 996 FUNCTION horzcat_d21(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT( out)996 FUNCTION horzcat_d21(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9) RESULT(OUT) 997 997 DOUBLE PRECISION, INTENT(IN) :: d0(:,:), d1(:) 998 998 DOUBLE PRECISION, OPTIONAL, INTENT(IN) :: d2(:), d3(:), d4(:), d5(:), d6(:), d7(:), d8(:), d9(:) … … 1041 1041 np = LEN_TRIM(p); ns = 0; ni = 0; nr = 0; ncol = 0 1042 1042 ls = PRESENT(s); li = PRESENT(i); lr = PRESENT(r) 1043 lerr = .FALSE.; IF(.NOT.ANY([ls,li,lr])) RETURN !--- Nothing to do1043 lerr = .FALSE.; IF(.NOT.ANY([ls,li,lr])) RETURN !--- Nothing to DO 1044 1044 sp = '|' !--- Separator 1045 1045 … … 1141 1141 rFm = '*'; IF(PRESENT(rFmt)) rFm = rFmt !--- Specified format for reals 1142 1142 ls = PRESENT(s); li = PRESENT(i); lr = PRESENT(r) 1143 lerr = .FALSE.; IF(.NOT.ANY([ls,li,lr])) RETURN !--- Nothing to do1143 lerr = .FALSE.; IF(.NOT.ANY([ls,li,lr])) RETURN !--- Nothing to DO 1144 1144 la = .FALSE.; IF(PRESENT(llast)) la = llast 1145 1145 … … 1446 1446 !=== Check whether a string is a number or not ================================================================================ 1447 1447 !============================================================================================================================== 1448 ELEMENTAL LOGICAL FUNCTION is_numeric(str) RESULT( out)1448 ELEMENTAL LOGICAL FUNCTION is_numeric(str) RESULT(OUT) 1449 1449 CHARACTER(LEN=*), INTENT(IN) :: str 1450 1450 REAL :: x … … 1462 1462 !=== Convert a string into a logical/integer integer or an integer/real into a string ========================================= 1463 1463 !============================================================================================================================== 1464 ELEMENTAL INTEGER FUNCTION str2bool(str) RESULT( out) !--- Result: 0/1 for .FALSE./.TRUE., -1 if not a valid boolean1464 ELEMENTAL INTEGER FUNCTION str2bool(str) RESULT(OUT) !--- Result: 0/1 for .FALSE./.TRUE., -1 if not a valid boolean 1465 1465 CHARACTER(LEN=*), INTENT(IN) :: str 1466 1466 INTEGER :: ierr … … 1476 1476 END FUNCTION str2bool 1477 1477 !============================================================================================================================== 1478 ELEMENTAL INTEGER FUNCTION str2int(str) RESULT( out)1478 ELEMENTAL INTEGER FUNCTION str2int(str) RESULT(OUT) 1479 1479 CHARACTER(LEN=*), INTENT(IN) :: str 1480 1480 INTEGER :: ierr … … 1483 1483 END FUNCTION str2int 1484 1484 !============================================================================================================================== 1485 ELEMENTAL REAL FUNCTION str2real(str) RESULT( out)1485 ELEMENTAL REAL FUNCTION str2real(str) RESULT(OUT) 1486 1486 CHARACTER(LEN=*), INTENT(IN) :: str 1487 1487 INTEGER :: ierr … … 1490 1490 END FUNCTION str2real 1491 1491 !============================================================================================================================== 1492 ELEMENTAL DOUBLE PRECISION FUNCTION str2dble(str) RESULT( out)1492 ELEMENTAL DOUBLE PRECISION FUNCTION str2dble(str) RESULT(OUT) 1493 1493 CHARACTER(LEN=*), INTENT(IN) :: str 1494 1494 INTEGER :: ierr … … 1497 1497 END FUNCTION str2dble 1498 1498 !============================================================================================================================== 1499 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION bool2str(b) RESULT( out)1499 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION bool2str(b) RESULT(OUT) 1500 1500 LOGICAL, INTENT(IN) :: b 1501 1501 WRITE(out,*)b 1502 out = ADJUSTL( out)1502 out = ADJUSTL(OUT) 1503 1503 END FUNCTION bool2str 1504 1504 !============================================================================================================================== 1505 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION int2str(i, nDigits) RESULT( out)1505 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION int2str(i, nDigits) RESULT(OUT) 1506 1506 INTEGER, INTENT(IN) :: i 1507 1507 INTEGER, OPTIONAL, INTENT(IN) :: nDigits 1508 1508 !------------------------------------------------------------------------------------------------------------------------------ 1509 1509 WRITE(out,*)i 1510 out = ADJUSTL( out)1510 out = ADJUSTL(OUT) 1511 1511 IF(.NOT.PRESENT(nDigits)) RETURN 1512 IF(nDigits > LEN_TRIM(out)) out = REPEAT('0', nDigits - LEN_TRIM(out))//TRIM( out)1512 IF(nDigits > LEN_TRIM(out)) out = REPEAT('0', nDigits - LEN_TRIM(out))//TRIM(OUT) 1513 1513 END FUNCTION int2str 1514 1514 !============================================================================================================================== 1515 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION real2str(r,fmt) RESULT( out)1515 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION real2str(r,fmt) RESULT(OUT) 1516 1516 REAL, INTENT(IN) :: r 1517 1517 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: fmt … … 1519 1519 IF( PRESENT(fmt)) WRITE(out,fmt)r 1520 1520 IF(.NOT.PRESENT(fmt)) WRITE(out, * )r 1521 out = ADJUSTL( out)1521 out = ADJUSTL(OUT) 1522 1522 END FUNCTION real2str 1523 1523 !============================================================================================================================== 1524 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION dble2str(d,fmt) RESULT( out)1524 ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION dble2str(d,fmt) RESULT(OUT) 1525 1525 DOUBLE PRECISION, INTENT(IN) :: d 1526 1526 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: fmt … … 1528 1528 IF( PRESENT(fmt)) WRITE(out,fmt)d 1529 1529 IF(.NOT.PRESENT(fmt)) WRITE(out, * )d 1530 out = ADJUSTL( out)1530 out = ADJUSTL(OUT) 1531 1531 END FUNCTION dble2str 1532 1532 !============================================================================================================================== … … 1548 1548 1549 1549 !============================================================================================================================== 1550 FUNCTION addQuotes_1(s) RESULT( out)1550 FUNCTION addQuotes_1(s) RESULT(OUT) 1551 1551 CHARACTER(LEN=*), INTENT(IN) :: s 1552 1552 CHARACTER(LEN=:), ALLOCATABLE :: out … … 1554 1554 END FUNCTION addQuotes_1 1555 1555 !============================================================================================================================== 1556 FUNCTION addQuotes_m(s) RESULT( out)1556 FUNCTION addQuotes_m(s) RESULT(OUT) 1557 1557 CHARACTER(LEN=*), INTENT(IN) :: s(:) 1558 1558 CHARACTER(LEN=:), ALLOCATABLE :: out(:) … … 1566 1566 END FUNCTION addQuotes_m 1567 1567 !============================================================================================================================== 1568 ELEMENTAL LOGICAL FUNCTION needQuotes(s) RESULT( out)1568 ELEMENTAL LOGICAL FUNCTION needQuotes(s) RESULT(OUT) 1569 1569 CHARACTER(LEN=*), INTENT(IN) :: s 1570 1570 CHARACTER(LEN=1) :: b, e … … 1580 1580 !=== DISPLAY "<message>: the following <items> are <reason>" FOLLOWED BY THE LIST OF <str> FOR WHICH <lerr>==T. =============== 1581 1581 !============================================================================================================================== 1582 LOGICAL FUNCTION checkList(str, lerr, message, items, reason, nmax) RESULT( out)1582 LOGICAL FUNCTION checkList(str, lerr, message, items, reason, nmax) RESULT(OUT) 1583 1583 ! Purpose: Messages in case a list contains wrong elements (indicated by lerr boolean vector). 1584 1584 ! Note: Return value "out" is .TRUE. if there are errors (ie at least one element of "lerr" is TRUE). … … 1610 1610 1611 1611 1612 END MODULE strings_mod1612 END MODULE lmdz_strings
Note: See TracChangeset
for help on using the changeset viewer.