High Level Language Programming


 

Function occurs

 

int occurs (char pattern[10000], int pat_length, char text[10000], int where)
{
    int index, match;

    match = 1;
    index = 0;
    while ((index < pat_length) && match)
    {
        if (pattern[index] != text[where+index])
            {match = 0}; // end if
        index = index + 1;
    } // end while
    return match;
} // end occurs


What are the formal parameters? What is the type of the returned value?

 

[Prev][TOC][Next]


CS1104 Main Page
Last Updated 01/05/2000
© L.Heath, 2000