src/function.c
bool reservedCSharp(char* str)
{
    int key = hashfunction(str);       
    
    /**
     * COLLISIONS FOUND
     * 209 -- float
     * 165 -- lock
     * 356 -- operator
     * 226 -- sbyte
     * 273 -- string
     * 273 -- typeof
     * 188 -- unit
     * 287 -- ushort
     * 344 -- volatile
     **/
    char ch = str[0];
    switch (ch)
    {
        case 'f':
            if(strcmp(str,"float")==0)
            {
                key++;
            }
            break;
        case 'l':
            if(strcmp(str,"lock")==0)
            {
                key++;
            }
            break;
        case 'o':
            if(strcmp(str,"operator")==0)
            {
                key++;
            }
            break;
        case 's':
            {
                ch = str[1];
                switch (ch)
                {
                    case 'b':
                        if(strcmp(str,"sbyte")==0)
                        {
                            key++;
                        }
                        break;
                    case 't':
                        if(strcmp(str,"string")==0)
                        {
                            key++;
                        }
                        break;
                    default:
                        break;
                }
            }
            break;
        case 't':
            if(strcmp(str,"typeof")==0)
            {
                key=key+2;
            }
            break;
        case 'u':
            {
                ch = str[1];
                switch (ch)
                {
                    case 'n':
                        if(strcmp(str,"unit")==0)
                        {
                            key++;
                        }
                        break;
                    case 's':
                        if(strcmp(str,"ushort")==0)
                        {
                            key++;
                        }
                        break;
                    default:
                        break;
                }
            }
            break;
        case 'v':
            if(strcmp(str,"volatile")==0)
            {
                key++;
            }
            break;
        default:
            break;
    }

    if(key<0 || key>HASHSIZE)                                   // if key is not valid
    {
        return false;
    }
    else if(HASH[key]!=NULL && strcmp(str,HASH[key])==0)        // is key found
    {
        return true;
    }
    else
    {
        return false;
    }   
}
/**
 * it will search a string in the collection of reserved words in C# language
 * 
 * @param search string
 * 
 * @return bool
 **/
it will search a string in the collection of reserved words in C# language

@param search string

@return bool
it will search a string in the collection of reserved words in C# language @param search string @return bool
bool reservedCSharp(char* str)
{
    int key = hashfunction(str);       
    char ch = str[0];
    switch (ch)
    {
        case 'f':
            if(strcmp(str,"float")==0)
            {
                key++;
            }
            break;
        case 'l':
            if(strcmp(str,"lock")==0)
            {
                key++;
            }
            break;
        case 'o':
            if(strcmp(str,"operator")==0)
            {
                key++;
            }
            break;
        case 's':
            {
                ch = str[1];
                switch (ch)
                {
                    case 'b':
                        if(strcmp(str,"sbyte")==0)
                        {
                            key++;
                        }
                        break;
                    case 't':
                        if(strcmp(str,"string")==0)
                        {
                            key++;
                        }
                        break;
                    default:
                        break;
                }
            }
            break;
        case 't':
            if(strcmp(str,"typeof")==0)
            {
                key=key+2;
            }
            break;
        case 'u':
            {
                ch = str[1];
                switch (ch)
                {
                    case 'n':
                        if(strcmp(str,"unit")==0)
                        {
                            key++;
                        }
                        break;
                    case 's':
                        if(strcmp(str,"ushort")==0)
                        {
                            key++;
                        }
                        break;
                    default:
                        break;
                }
            }
            break;
        case 'v':
            if(strcmp(str,"volatile")==0)
            {
                key++;
            }
            break;
        default:
            break;
    }
    if(key<0 || key>HASHSIZE)                                   
    {
        return false;
    }
    else if(HASH[key]!=NULL && strcmp(str,HASH[key])==0)        
    {
        return true;
    }
    else
    {
        return false;
    }   
}
bool reservedCSharp ( char * str ) { int key = hashfunction ( str ) ; char ch = str [ 0 ] ; switch ( ch ) { case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; case ' ' : { ch = str [ 1 ] ; switch ( ch ) { case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; default : break ; } } break ; case ' ' : if ( strcmp ( str , " " ) == 0 ) { key = key + 2 ; } break ; case ' ' : { ch = str [ 1 ] ; switch ( ch ) { case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; default : break ; } } break ; case ' ' : if ( strcmp ( str , " " ) == 0 ) { key ++ ; } break ; default : break ; } if ( key < 0 || key > HASHSIZE ) { return false ; } else if ( HASH [ key ] != NULL && strcmp ( str , HASH [ key ] ) == 0 ) { return true ; } else { return false ; } }
it will search a string in the collection of reserved words in C# language
it will search a string in the collection of reserved words in C# language
/**
     * COLLISIONS FOUND
     * 209 -- float
     * 165 -- lock
     * 356 -- operator
     * 226 -- sbyte
     * 273 -- string
     * 273 -- typeof
     * 188 -- unit
     * 287 -- ushort
     * 344 -- volatile
     **/ // if key is not valid // is key found