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)
79900
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)
84901
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)
89902
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 bort2(STR1, STR2)
This subroutine calls subroutine errwrt() to log two error messages, then calls subroutine bort_exit(...
subroutine parstr(STR, TAGS, MTAG, NTAG, SEP, LIMIT80)
THIS SUBROUTINE PARSES A STRING CONTAINING ONE OR MORE SUBSTRINGS INTO AN ARRAY OF SUBSTRINGS.