[fpc-devel] Stringlist sortstyle ssluser
Michael Van Canneyt
michael at freepascal.org
Thu Dec 27 11:58:26 CET 2018
On Wed, 26 Dec 2018, Franz Müller wrote:
> In the current implementation of TStringlist, there is a property
> SortStyle, which is somewhat similar to the property Sorted. However, it
> is different from sorted in that it allows 3 values: sslnone, which
> corresponds to sorted=false, sslAuto, which corresponds to sorted=true,
> and sslUser, which correspnds to ????
>
> This third value introduces some inconsistency. If the user is
> responsible for sorting, as is written in the documentation, this must
> be meant to be done by caling customsort - otherwise it would make
> absolutey no sense to leave sorting to the user.
Not correct, it is meant for the cases when the user knows the list is sorted.
> And in addition the
> procedures used for comparing auto-sorted procedures are local to the
> Stringlist unit, so the application programmer would not even be able to
> use these methods for sorting himself.
No, because you can load data from an already sorted file.
Then it makes no sense to sort again.
Michael.
More information about the fpc-devel
mailing list