C ***** This is the routine in the ComAdrs Program ***** C ***** that reads a record from the COMINT Address ***** C ***** Specification File and then capitalizes all ***** C ***** letters (a through z) in the record and then ***** C ***** removes all space characters from the record ***** C ***** and then stores the record in the character ***** C ***** array "ThisLine". An original copy of the ***** C ***** record is kept in the character array ***** C ***** "OrigThisLine". The symbol NumChr shows the ***** C ***** number of characters in the record. ***** C ***** ***** C ***** ComAdrs Program Rev. 21-OCT-1991 ***** SUBROUTINE Get_Record_and_Capitalize C ***************************************** C Define all Variables and Arrays C ***************************************** IMPLICIT NONE INCLUDE 'ComAdrs_Common.INC' INTEGER*2 TempChrPt,LineLength C *************************************************************** C Read a record from the COMINT Address Specification File. C *************************************************************** 100 READ ( UNIT=10, FMT=110, ERR=300, END=300, IOSTAT=IOSTATUS ) & NumChr, ( ThisLine(ChrPt), ChrPt=1,NumChr ) 110 FORMAT ( Q,255A1 ) C *************************************************************** C Keep a copy of the original form of this record and C its parameters i.e. capital and lower case letters. C *************************************************************** DO ChrPt=1,NumChr,1 OrigThisLine(ChrPt) = ThisLine(ChrPt) END DO OrigChrPt = ChrPt OrigNumChr = NumChr C *************************************************************** C Now capitalize all letters "a" through "z" in this record. C *************************************************************** DO ChrPt=1,NumChr,1 IF ( ThisLine(ChrPt) .EQ. 'a') ThisLine(ChrPt) = 'A' IF ( ThisLine(ChrPt) .EQ. 'b') ThisLine(ChrPt) = 'B' IF ( ThisLine(ChrPt) .EQ. 'c') ThisLine(ChrPt) = 'C' IF ( ThisLine(ChrPt) .EQ. 'd') ThisLine(ChrPt) = 'D' IF ( ThisLine(ChrPt) .EQ. 'e') ThisLine(ChrPt) = 'E' IF ( ThisLine(ChrPt) .EQ. 'f') ThisLine(ChrPt) = 'F' IF ( ThisLine(ChrPt) .EQ. 'g') ThisLine(ChrPt) = 'G' IF ( ThisLine(ChrPt) .EQ. 'h') ThisLine(ChrPt) = 'H' IF ( ThisLine(ChrPt) .EQ. 'i') ThisLine(ChrPt) = 'I' IF ( ThisLine(ChrPt) .EQ. 'j') ThisLine(ChrPt) = 'J' IF ( ThisLine(ChrPt) .EQ. 'k') ThisLine(ChrPt) = 'K' IF ( ThisLine(ChrPt) .EQ. 'l') ThisLine(ChrPt) = 'L' IF ( ThisLine(ChrPt) .EQ. 'm') ThisLine(ChrPt) = 'M' IF ( ThisLine(ChrPt) .EQ. 'n') ThisLine(ChrPt) = 'N' IF ( ThisLine(ChrPt) .EQ. 'o') ThisLine(ChrPt) = 'O' IF ( ThisLine(ChrPt) .EQ. 'p') ThisLine(ChrPt) = 'P' IF ( ThisLine(ChrPt) .EQ. 'q') ThisLine(ChrPt) = 'Q' IF ( ThisLine(ChrPt) .EQ. 'r') ThisLine(ChrPt) = 'R' IF ( ThisLine(ChrPt) .EQ. 's') ThisLine(ChrPt) = 'S' IF ( ThisLine(ChrPt) .EQ. 't') ThisLine(ChrPt) = 'T' IF ( ThisLine(ChrPt) .EQ. 'u') ThisLine(ChrPt) = 'U' IF ( ThisLine(ChrPt) .EQ. 'v') ThisLine(ChrPt) = 'V' IF ( ThisLine(ChrPt) .EQ. 'w') ThisLine(ChrPt) = 'W' IF ( ThisLine(ChrPt) .EQ. 'x') ThisLine(ChrPt) = 'X' IF ( ThisLine(ChrPt) .EQ. 'y') ThisLine(ChrPt) = 'Y' IF ( ThisLine(ChrPt) .EQ. 'z') ThisLine(ChrPt) = 'Z' END DO C *************************************************************** C Now add two space characters after the end of the record. C *************************************************************** ThisLine(NumChr+1) = ' ' ThisLine(NumChr+2) = ' ' C *************************************************************** C Now remove all space characters from this record. C *************************************************************** 170 CONTINUE DO ChrPt=1,NumChr,1 IF ( ThisLine(ChrPt) .NE. ' ' ) GOTO 150 DO TempChrPt=ChrPt,NumChr,1 ThisLine(TempChrPt) = ThisLine(TempChrPt+1) END DO NumChr = NumChr - 1 GOTO 170 150 CONTINUE END DO C ***** Now display the record on the terminal in ***** C ***** the same form as it was read from the file. ***** IF ( Full_Display .EQ. 0 ) GOTO 235 IF ( OrigNumChr .GT. 77 ) THEN LineLength = 78 ELSE LineLength = OrigNumChr END IF WRITE ( 6, 220 ) & ( OrigThisLine(OrigChrPt), OrigChrPt=1,LineLength ) 220 FORMAT ( ' ', 255A1 ) 235 CONTINUE C ***** Now display the record on the terminal with all ***** C ***** space characters removed and in all capital letters. ***** IF ( Full_Display .EQ. 0 ) GOTO 255 IF ( NumChr .GT. 77 ) THEN LineLength = 78 ELSE LineLength = NumChr END IF WRITE ( 6, 257 ) & ( ThisLine(ChrPt), ChrPt=1,LineLength ) 257 FORMAT ( ' ', 255A1 ) 255 CONTINUE C ***** End of Get_Record_and_Capitalize_It. ***** 300 RETURN END