37 SUBROUTINE parstr(STR,TAGS,MTAG,NTAG,SEP,LIMIT80)
41 CHARACTER*(*) str,tags(mtag)
42 CHARACTER*128 bort_str1,bort_str2
44 LOGICAL substr,limit80
51 IF( limit80 .AND. (lstr.GT.80) ) goto 900
58 IF( .NOT.substr .AND. (str(i:i).NE.sep) )
THEN
60 IF(ntag.GT.mtag) goto 901
64 IF( substr .AND. (str(i:i).EQ.sep) ) nchr = 0
65 substr = str(i:i).NE.sep
69 IF(nchr.GT.ltag) goto 902
70 tags(ntag)(nchr:nchr) = str(i:i)
79 900
WRITE(bort_str1,
'("BUFRLIB: PARSTR - INPUT STRING (",A,") HAS ")')
81 WRITE(bort_str2,
'(18X,"LENGTH (",I4,"), > LIMIT OF 80 CHAR.")')
83 CALL
bort2(bort_str1,bort_str2)
84 901
WRITE(bort_str1,
'("BUFRLIB: PARSTR - INPUT STRING (",A,") '//
85 .
'CONTAINS",I4)') str,ntag
86 WRITE(bort_str2,
'(18X,"SUBSTRINGS, EXCEEDING THE LIMIT {",I4,'//
87 .
'" - THIRD (INPUT) ARGUMENT}")') mtag
88 CALL
bort2(bort_str1,bort_str2)
89 902
WRITE(bort_str1,
'("BUFRLIB: PARSTR - INPUT STRING (",A,") ")') str
90 WRITE(bort_str2,
'(18X,"CONTAINS A PARSED SUBSTRING WITH LENGTH '//
91 .
'EXCEEDING THE MAXIMUM OF",I4," CHARACTERS")') ltag
92 CALL
bort2(bort_str1,bort_str2)
subroutine parstr(STR, TAGS, MTAG, NTAG, SEP, LIMIT80)
THIS SUBROUTINE PARSES A STRING CONTAINING ONE OR MORE SUBSTRINGS INTO AN ARRAY OF SUBSTRINGS...
subroutine bort2(STR1, STR2)
This subroutine calls subroutine errwrt() to log two error messages, then calls subroutine bort_exit(...