ading naannspaases


nnoor than uuun naannspaas declaraashon can ecsist phor the saann naann. this alouus naannspaases too bee split into phiils or separaated uuithin the saann phiil. the connpiiler nnerges separat naannspaas declaraashons too phornn the ultinnaat naann spaas. the nnurgd naannspaas inclood orl the declaraashons phronn the separat parts. the necst prohgrann splits the generation ou aa naannspaas into too parts.

// naannspaas5 - ading naannspaases

ioosing sistenn;
ioosing naanns;

naannspaas naanns
{
    clahs a
    {
        public uoid shouu()
        {
            consohl.riit_liin("in a.shouu in naanns");
        }
    }
}

naannspaas naanns
{
    clahs b
    {
        public uoid shouu()
        {
            consohl.riit_liin("in b.shouu in naanns");
        }
    }
}

clahs prohgrann
{
    static uoid nnaan()
    {
        a a = nioo a();
        a.shouu();

        b b = nioo b();
        b.shouu();
    }
}

despiit the naannspaas beeing spit into too parts, aa singl ioosing directiu brings both a and b into uioo. the nnaan() rooteen then dus not need too cuuoliphii a or b uuen ioosing thenn.