Let me check what I can do.
Maybe I can add COLLATE UCASE ...
If i do some
(see images, check filelist low-left)Array Sort ..., AsFiles
on a string-array (that contains filenames) it does not ignore LCase/Ucase but sorts the filenames starting with UCase-chars, thereafter follow the filenames starting with LCase-chars in most cases.
Sometimes it does not even follow that rule but messes up the order completely. (image 2, where i sort standard previously and then AsFiles)
I found out that it sorts by LENGTH if using Ascend or Descend
Is there a way to simply sort by alphabet - no matter if UCase or LCase-char?
( Collate Ucase ??? )
Another example:
Help says
but in case one filename (or common string) starts with a lower-case "p" it will get sorted to the end mostly.
A standard order would sort the above list in the following way While using ASFILES it will sort considering the numeric part be a number Picture1.jpg
Picture10.jpg
Picture11.jpg
Picture12.jpg
Picture2.jpg
Picture3.jpg
Picture4.jpg
Picture5.jpg
Picture6.jpg
Picture7.jpg
Picture8.jpg
Picture9.jpgPicture1.jpg
Picture2.jpg
Picture3.jpg
Picture4.jpg
Picture5.jpg
Picture6.jpg
Picture7.jpg
Picture8.jpg
Picture9.jpg
Picture10.jpg
Picture11.jpg
Picture12.jpg
Last edited by ReneMiner; 03-11-2015 at 15:08.
I think there are missing some Forum-sections as beta-testing and support
Let me check what I can do.
Maybe I can add COLLATE UCASE ...
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Rene,
try attached 1.9.16.1 thinCore.dll (copy into your \thinBasic\ directory replacing your current one).
I've added Collate Ucase option to Array Sort and also adjust AsFiles option that I think had a bug.
If all OK I will publish an update: 1.9.16.2
Let me know.
Ciao
Eros
Examples of new syntax. If you DEBUG and step by step inspect sourceArray array you will see the difference:
Uses "Console" Dim sourceArray(10) As String Array Assign sourceArray(1) = "tUI.tBasicU", "tNode.tbasicu", "tMouse.tBasicU", "tWindow.tBasicU", "Fontslot.tBasicU", "Settings.tBasicU", "tControl_Label.tBasicU", "tControl_PopUp.tBasicU", "tControl_Button.tBasicU", "tDesktop.tBasicU" Array Sort sourcearray(), Collate Ucase, AsFiles Array Sort sourcearray(), Collate Ucase, Descending, AsFiles Array Sort sourcearray(), Collate Ucase Array Assign sourceArray(1) = "tUI10.tBasicU", "tUI1.tBasicU", "tUI2.tBasicU", "tUI3.tBasicU", "tUI4.tBasicU", "tUI22.tBasicU", "tUI6.tBasicU", "tUI7.tBasicU", "tUI8.tBasicU", "tUI5.tBasicU" Array Sort sourcearray(), Collate Ucase, Ascending, AsFiles Array Sort sourcearray(), Collate Ucase, Descending, AsFiles Array Sort sourcearray(), Collate Ucase, AsFiles Array Sort sourcearray(), Collate Ucase Array Sort sourcearray(), Descending Array Sort sourcearray() Print "---All done---" WaitKey
Last edited by ErosOlmi; 10-10-2017 at 08:05.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
That looks much better, mille grazie
Last edited by ReneMiner; 04-11-2015 at 11:00.
I think there are missing some Forum-sections as beta-testing and support
Bookmarks