![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
|
|
Themen-Optionen | Ansicht |
|
|
#3 |
|
Inventar
![]() Registriert seit: 08.02.2000
Beiträge: 1.696
|
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 )
}
____________________________________
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. |
|
|
|
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|