logical found, error
found = .false.
do while (.not.found .and. nd .le. ndatebc)
found = .true.
if (.not.found) then
LOGICAL found
found = .FALSE.
IF ( diagName.EQ.cdiag(i) ) found = .TRUE.
IF ( .NOT.found ) THEN
IF ( found ) THEN
found = .TRUE.
IF ( found .AND. mate.NE.0 ) THEN
LOGICAL found, addMate2List, inList, regListPb
IF ( found .AND. mate.LE.-1 ) THEN