Here I'm going to look for a string in memory.
if the searched string is already present i add 1 to counted
and rewrite it
otherwise I simply write it.
example
ii = 0; for (ii < count)
{
memval(0, ii, &s);
nm = split(s, s1, ',');
c1b = numstr(s1[1]);
c2b = numstr(s1[2]);
c3b = numstr(s1[3]);
c4b = numstr(s1[4]);
strset(pr1, "%d,%d,%d,%d",c1b,c2b,c3b,c4b);
if (TRUE = strcmp(p1, pr1))
{
contati = numstr(s1[5])+ 1;
div = numstr(s1[6]);
strset(s, "%9s,%d,%d,%d,%d,%8d,%d",chi2s,c1,c2,c3,c4,contati,div);
memwrite(0, ii, &s);
ii = count;`if found rewrite and exit
return;
}}
`if not found write and exit
contati = 1;
strset(s, "%9s,%d,%d,%d,%d,%8d,%d",chi2s,c1,c2,c3,c4,contati,div);
memwrite(0, count, &s);
count += 1;
return;
Already with 50 themes it becomes very very slow
in reading and writing.
maybe there is a search function or a index on file
that speeds up a lot ?