Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10586

Re: Bug in Sort !?!?

From James Stein <mathgroup@stein.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Bug in Sort !?!?
Date 2012-06-22 07:01 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <js158b$ke4$1@smc.vnet.net> (permalink)
References <jrp94p$qbs$1@smc.vnet.net> <201206210915.FAA15894@smc.vnet.net>

Show all headers | View raw


KKL is correct; my apologies to all.

On Thu, Jun 21, 2012 at 2:15 AM, nanobio9 <kuokan.liang@gmail.com> wrote:
> On 6=E6=9C=8819=E6=97=A5, =E4=B8=8B=E5=8D=883=E6=99=8218=E5=88=86, James Stein <mathgr...@stein.org> wrote:
>> The documentation says: "Sort orders strings as in a dictionary, with
>> uppercase versions of letters coming after lowercase ones." It is
>> therefore unsurprising that { "3", "4", "4b" } are already sorted.
>> But who can correctly predict the three True/False values produced by
>> the six lines below? (And who can explain it?)
>>
>> s={"3","4","4b"};
>> Sort[s] == s
>> s=Map[StringJoin[#,"."]&,s];
>> Sort[s] == s
>> s=Map[StringJoin[#,"nb"]&,s];
>> Sort[s] == s
>
> The character code of "." is 46, smaller than "a", "1", etc. I do not
> see a bug here.
>
> Regards,
> KKL
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Bug in Sort !?!? James Stein <mathgroup@stein.org> - 2012-06-19 07:18 +0000
  Re: Bug in Sort !?!? David Bailey <dave@removedbailey.co.uk> - 2012-06-21 09:16 +0000
  Re: Bug in Sort !?!? nanobio9 <kuokan.liang@gmail.com> - 2012-06-21 09:16 +0000
  Re: Bug in Sort !?!? James Stein <mathgroup@stein.org> - 2012-06-22 07:01 +0000

csiph-web