Wayne's Knowledge Base  

0-9 . A . B . C . D . E . F . G . H . I . J . K . L . M . N . O . P . Q . R . S . T . U . V . W . X . Y . Z . А-Я

Sort By Name

function sort_by_name()
{
var b;
var c;
var name = new Array();

for(b=1;b<=npeeps;b++) name[b]=full_name[b]+Year[b];

for(b=1;b<=npeeps;b++)
    {
    rank[b]=b;
    c=b-1;
    while (c>0)
        {
        if (name[c]>name[b]) {rank[b]--; rank[c]++;}
        c--;
        }
    }

for(b=1;b<=npeeps;b++)
    {
    oo[rank[b]]=b;
    }
}


Related Pages