logical function test_SoftExit()
logical :: tdummy1, tdummy2
tSoftExitFound = .false.
call ChangeVars(tdummy1, tdummy2)
if (tSoftExitFound) write (stdout,'(1X,a30)') 'Request for SOFTEXIT detected.'
test_SoftExit = tSoftExitFound
tSoftExitFound = .false.
end function test_SoftExit