C ***** This is the routine in the WaveForm Program ***** C ***** that reads the Trailer Section of the ***** C ***** Timing Specification File. If the short ***** C ***** display mode is in effect then the trailer ***** C ***** is displayed on the terminal. ***** C ***** ***** C ***** MTG WaveForm Program Rev. 19-OCT-1991 ***** SUBROUTINE Trailer_Section C ***************************************** C Define all Variables and Arrays C ***************************************** IMPLICIT NONE INCLUDE 'WaveForm_Common.INC' INTEGER*2 LineLength C ************************************************** C Advertize that the Timing Specification File C has been opened and that the Header Section C will now be read and displayed. C ************************************************** WRITE ( 6, 80 ) 80 FORMAT ( /, & ' The Trailer Section of the Timing Specification ', /, & ' File will now be read and displayed.', / ) C ******************************************************* C Now loop reading the records in the Trailer C Section. Display the records if we are in C SHORT display format mode (otherwise they will C be displayed by the Get_Record_and_Capit routine. C Return when the End of File is found. C ******************************************************* 100 CALL Get_Record_and_Capitalize IF ( IOSTATUS .EQ. -1 ) GOTO 940 IF ( IOSTATUS .NE. 0 ) GOTO 970 C ***** If in short format then display this trailer record. ***** IF ( Full_Display .EQ. 1 ) 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 continue the loop to get the next record of the trailer. ***** GOTO 100 C ************************************************************ C This is the section for handling IO Errors and all Exits C ***********************************---------*********-----** 940 WRITE ( 6, 941 ) 941 FORMAT ( /, & ' The end of the Trailer Section and the ', /, & ' end of the Timing Specification File ', /, & ' have been reached. The Timing ', /, & ' Specification File will now be closed. ', / ) CLOSE ( UNIT=10 ) RETURN 970 WRITE ( 6, 971 ) IOSTATUS 971 FORMAT ( /, & ' There has been an IO System Error trying ', / & ' to Read from the Timing Specification ', / & ' file. Is this file of the correct format? ', // & ' Did you type the filename correctly? ', // & ' Fortran Read IOSTAT = ', I3, // & ' You will need to restart the program. ' , // ) CLOSE ( UNIT=10 ) 998 WRITE ( 6, 999 ) 999 FORMAT ( / ' MTG WaveForm Program will now exit. ', // ) STOP ' ' END