Can someone explain the following code to me? It comes from
DFAContentModel.cpp, lines 744 through 755.  Specifically, why is -1
being assigned to an array of unsigned ints?

Here is the code:
//
//  -1 is used to represent bad transitions in the transition table
entry for
//  each state. So each entry is initialized to an all -1 array. This
method
//  creates a new entry and initializes it.
//
unsigned int* DFAContentModel::makeDefStateList() const
{
    unsigned int* retArray = new unsigned int[fElemMapSize];
    for (unsigned int index = 0; index < fElemMapSize; index++)
        retArray[index] = -1;
    return retArray;
}

-- 
Craig Noah                  INTERNET: [EMAIL PROTECTED]
Software Engineer

                Sterling Software ITD 
1404 Fort Crook Road South     Phone:    (402) 291-8300 x 284
Bellevue,  NE   68005-2969     FAX:      (402) 291-4362

Reply via email to