Re: Multi Sort Array bug

2016-10-04 Thread Keith Culotta
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  
> 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 
>> 
>> 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  のメール:
>>> 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:4d_tech-unsubscr...@lists.4d.com
**

Re: Multi Sort Array bug

2016-10-04 Thread Richard Wright
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 
> 
> 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  のメール:
>> 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:4d_tech-unsubscr...@lists.4d.com
**

Re: Multi Sort Array bug

2016-10-03 Thread Keisuke Miyako
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  のメール:
> Apparently Multi Sort Array performs case-sensitve searches, unlike anything 
> else in 4D.



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

**
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:4d_tech-unsubscr...@lists.4d.com
**

Multi Sort Array bug

2016-10-03 Thread Richard Wright
Apparently Multi Sort Array performs case-sensitve searches, unlike anything 
else in 4D. This is certainly not documented. Try this:

-
ARRAY TEXT(aHistIsbn;8)
ARRAY DATE(aHistDate;8)
 
aHistIsbn{1}:="abcde"
aHistIsbn{2}:="abcde"
aHistIsbn{3}:="Abcde"
aHistIsbn{4}:="aBcde"
aHistIsbn{5}:="abcDE"
aHistIsbn{6}:="ABCDE"
aHistIsbn{7}:="xyz10"
aHistIsbn{8}:="XYZ10"
 
aHistDate{1}:=!01/01/2016!
aHistDate{2}:=!02/01/2016!
aHistDate{3}:=!03/01/2016!
aHistDate{4}:=!04/01/2016!
aHistDate{5}:=!05/01/2016!
aHistDate{6}:=!06/01/2016!
aHistDate{7}:=!01/01/2016!
aHistDate{8}:=!02/01/2016!
 
MULTI SORT ARRAY(aHistIsbn;>;aHistDate;<)
-

and you’ll get this:

abcde 2/1/16
abcde 1/1/16
abcDE 5/1/16
aBcde 4/1/16
Abcde 3/1/16
ABCDE 6/1/16
xyz10 1/1/16
XYZ10 2/1/16



Richard Wright
DataDomain
rwri...@datadomainsoftware.com


**
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:4d_tech-unsubscr...@lists.4d.com
**