Richard,

It looks like it is sensitive about case, but not like I expected.  It puts 
lowercase before UPPERCASE instead of after ("a",97 before "A",65) when it's 
comparing the same letter in the same [[position]] in a string.  I was 
expecting a sort like you'd get if all letters were converted to one case, and 
then sorted.

ARRAY TEXT($arr;0)
APPEND TO ARRAY($arr;"A")
APPEND TO ARRAY($arr;"a")
APPEND TO ARRAY($arr;"B")
APPEND TO ARRAY($arr;"b")
APPEND TO ARRAY($arr;"C")
APPEND TO ARRAY($arr;"c")
APPEND TO ARRAY($arr;"D")
APPEND TO ARRAY($arr;"d")
APPEND TO ARRAY($arr;"E")
APPEND TO ARRAY($arr;"e")

MULTI SORT ARRAY($arr;>)  // results=> aAbBcCdDeE
SORT ARRAY($arr)  // results=> aAbBcCdDeE

ALL RECORDS([Table_1])
ARRAY TO SELECTION($arr;[Table_1]Sorting)
ORDER BY([Table_1];[Table_1]Sorting)
SELECTION TO ARRAY([Table_1]Sorting;$arr)  // results=> aAbBcCdDeE

Keith - CDI

> On Oct 4, 2016, at 11:40 AM, Richard Wright <[email protected]> 
> wrote:
> 
> Hmm. So the Design Reference has always been wrong? In the Order By Editor 
> section, Sort Levels paragraph:
> 
> "When sorting the contents of fields, 4D is not case sensitive (i.e., “Smith” 
> = “smith”) or diacritical sensitive (i.e., “Aá” = “Aa”). However, if you are 
> using an international version of 4D and your operating system is diacritical 
> sensitive (e.g., “Aá” ¦ “Aa”), sorting operations will also take diacritical 
> marks into account”
> 
> http://doc.4d.com/4Dv15R5/4D/15-R5/Order-by-editor.300-2964328.en.html
> 
> As far as I know I’m using the English version of 4D, not an international 
> version (although I don’t know to verify that).
> 
> 
> 
>> Date: Mon, 3 Oct 2016 22:46:37 +0200
>> From: Keisuke Miyako <[email protected]>
>> 
>> there has always been 2 levels of text comparison in 4D,
>> one for search, find, equality operators,
>> and another for sort, order by, greater/less than operators.
>> 
>> sorting has always been case sensitive.
>> 
>>> 2016/10/04 1:28、Richard Wright <[email protected]> のメール:
>>> Apparently Multi Sort Array performs case-sensitve searches, unlike 
>>> anything else in 4D.
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to