Einzelnen Beitrag anzeigen
Alt 28.08.2002, 17:13   #3
SNo0py
Inventar
 
Registriert seit: 08.02.2000
Beiträge: 1.696


Standard

Puh, schaut ja wild aus... Danke, werd ich mir merken! Ich habs jetzt aber schon anders gelöst:

Code:
// search for next , or )
int p = 0; int c = 0;
for(int i = 0; i < Param.Count; i++)
{
	if((string)Param[i] == "(")	p ++;		// count (
	if((string)Param[i] == "," && p == 0)	// , found
	{
		// handle parameter
		c = i + 1;
	}
	if((string)Param[i] == ")" && p == 0)	// matching ) found
	{
		// handle last parameter (if any)

		lineStack.Add("fend");
		return true;
	}
	if((string)Param[i] == ")")	p --;		// count )
}
mfg, cu!
____________________________________
Sex is like hacking. You get in, you get out, and you hope you didnt leave something behind that can be traced back to you.
SNo0py ist offline   Mit Zitat antworten