#define XERR
#include "loop.ih"

void Loop::screening()
{
    if (d_status == PRESENT and d_nRounds > 0)
        g_log << "\nLoop::screening starts\n";

        // d_round is a data member: available in all of Loop's members
    for (d_round = 0; d_status == PRESENT and d_round != d_nRounds; ++d_round)
    {
        double screeningAge = d_screening.roundAge(d_round);

        if (leaving(screeningAge))      // the case has died/detected a tumor
            return;

        screen(screeningAge);
    }
}
