[fpc-devel] Re: enumerators
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Nov 15 16:50:52 CET 2010
Marco van de Voort schrieb:
>> At least the example code has to be made work, i.e. the nonsense statement
>> DoSomething(ch(i));
>> has to be changed into something like
>> DoSomething(GetUTF8char(s,i));
>> before we can can talk honestly about the order of the loop.
>
> The other of the algorithm is then still O(n^2), since UTF8Char will already
> be O(n)?
The total order will be something between O(n^1) and O(n^2), depending
on many factors (what is "n"?...).
I also doubt that UTF8char is a reasonable type for the loop variable -
IMO UTF32char were a much better choice...
DoDi
More information about the fpc-devel
mailing list