I have an incoming stream of names on an OSC adress. I would like to know if the last 2 names received are the same.
I wrote the following code to find that out:
Code: Select all
decl i;
decl z;
i= (number++)%2; //modulo between 0 and 1 everytime a resource is changed.
z[i]=OSC_ARGS; //put current name in array
point=diff(z);
Now when I put in the same string twice in a row I get a point is {0, "string"} however, if i then give the string a third time, it gives "string". Also if i change to another name as input the results stays the same, the diff is always {0, "string"} or {string}.
Anybody tried diff'ing strings before?