THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/04/2003 at 07:11, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.303
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
---------
Hi !
I want to parse a string and therefore seek any ">" in it. But unfortunately, these C.O.F.F.E.E. lines don't work:
var MyString = "<tag>text</tag>";
var pos = 0;
var chpos = 0;
while (strchr (MyString,"<[0]",pos) != -1){
chpos = strchr (MyString,"<[0]",pos) ;
println (tostring(chpos));
pos = chpos;
}
The while loop turns into an infinite loop and the value of pos/chpos remains at 0, which is the first position of "<" in the given string.
I guess, C.O.F.F.E.E. forgets to update the pos/chpos-variables and this might be caused by using referenced values instead of copies.
Does anyone have a clue to solve this ?
thanx