Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | StartLine | |||
character(len=*), | intent(in) | :: | cStartLine | |||
character(len=*), | intent(in) | :: | cStartName | |||
integer, | intent(in) | :: | CurLine | |||
integer, | intent(in) | :: | NumConxLines | |||
character(len=*), | intent(in), | DIMENSION(:) | :: | LineBuf | ||
integer, | intent(in) | :: | CurQPtr |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE DumpCurrentLineBuffer(StartLine,cStartLine,cStartName,CurLine,NumConxLines,LineBuf,CurQPtr)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN February 2003
! MODIFIED March 2012 - Que lines instead of holding all.
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine dumps the "context" lines for error messages detected by
! the input processor.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: StartLine
CHARACTER(len=*), INTENT(IN) :: cStartLine
CHARACTER(len=*), INTENT(IN) :: cStartName
INTEGER, INTENT(IN) :: CurLine
INTEGER, INTENT(IN) :: NumConxLines
CHARACTER(len=*), INTENT(IN), DIMENSION(:) :: LineBuf
INTEGER, INTENT(IN) :: CurQPtr
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Line
! INTEGER PLine
INTEGER SLine
INTEGER CurPos
CHARACTER(len=32) :: cLineNo
CHARACTER(len=300) TextLine
CALL ShowMessage('IDF Context for following error/warning message:')
CALL ShowMessage('Note -- lines truncated at 300 characters, if necessary...')
IF (StartLine <= 99999) THEN
WRITE(TextLine,'(1X,I5,1X,A)') StartLine,trim(cStartLine)
ELSE
WRITE(cLineNo,*) StartLine
cLineNo=ADJUSTL(cLineNo)
WRITE(TextLine,'(1X,A,1X,A)') trim(cLineNo),trim(cStartLine)
ENDIF
CALL ShowMessage(TRIM(TextLine))
IF (cStartName /= Blank) THEN
CALL ShowMessage('indicated Name='//trim(cStartName))
ENDIF
CALL ShowMessage('Only last '//trim(IPTrimSigDigits(NumConxLines))//' lines before error line shown.....')
SLine=CurLine-NumConxLines+1
IF (NumConxLines == SIZE(LineBuf)) THEN
CurPos=CurQPtr+1
IF (CurQPtr+1 > SIZE(LineBuf)) CurPos=1
ELSE
CurPos=1
ENDIF
DO Line=1,NumConxLines
IF (SLine <= 99999) THEN
WRITE(TextLine,'(1X,I5,1X,A)') SLine,trim(LineBuf(CurPos))
ELSE
WRITE(cLineNo,*) SLine
cLineNo=ADJUSTL(cLineNo)
WRITE(TextLine,'(1X,A,1X,A)') trim(cLineNo),trim(LineBuf(CurPos))
ENDIF
CALL ShowMessage(TRIM(TextLine))
CurPos=CurPos+1
IF (CurPos > SIZE(LineBuf)) CurPos=1
SLine=SLine+1
ENDDO
RETURN
END SUBROUTINE DumpCurrentLineBuffer