Hi...

You're absolutely right Uhrwerk. :-)
your code fits better in my code.


Code:
//------------------------------------------------------------------------------------------
//------------------------------ function f_check_for_invalid_chars
function f_check_for_invalid_chars(STRING** l_array_str)
{
	int l_i = 0;
	int l_temp_1_int;
	int l_temp_2_int;
	
	STRING* l_temp_1_str = " ";
	char l_chr = ' ';
	
	bool l_while_stop_bool;
	
	l_temp_1_str = l_array_str[1];
	l_temp_2_int = str_len(l_temp_1_str);
	
	l_i = 1;
	l_while_stop_bool = false;
	
	while ( (l_i <= l_temp_2_int ) && (l_while_stop_bool == false) )
	{
		l_temp_1_int = 0;
		l_chr = str_getchr(l_temp_1_str, l_i);
		
                if (  (l_chr >= 'A' && l_chr <= 'Z') || 
                      (l_chr >= 'a' && l_chr <= 'z') || 
                      (l_chr >= '0' && l_chr <= '9')  )
                {
                    l_temp_1_int = 1;
                }

		if (l_temp_1_int == 1)
		{
			l_i++;
		}
		else
		{
			l_while_stop_bool = true;
		}
		
	}
	
	if (l_while_stop_bool == true)
	{
		printf("Invalid Name");
		return -2;
	}
	else
	{
		printf("Name was saved");
		return 1;
	}
}



thx you all...

Best Regards.
Dimitris.

Last edited by NeoJT; 04/29/13 14:46.