Results 1 to 4 of 4

Thread: Array Sort- issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    55
    Posts
    1,554
    Rep Power
    174

    Array Sort- issue

    If i do some
    Array Sort ..., AsFiles
    
    (see images, check filelist low-left)

    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
    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.jpg
    Picture1.jpg
    Picture2.jpg
    Picture3.jpg
    Picture4.jpg
    Picture5.jpg
    Picture6.jpg
    Picture7.jpg
    Picture8.jpg
    Picture9.jpg
    Picture10.jpg
    Picture11.jpg
    Picture12.jpg
    but in case one filename (or common string) starts with a lower-case "p" it will get sorted to the end mostly.
    Attached Images Attached Images
    Last edited by ReneMiner; 03-11-2015 at 15:08.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. copy array of UDT to another array in one step?
    By ReneMiner in forum thinBasic General
    Replies: 3
    Last Post: 02-11-2012, 01:15
  2. Replacing ARRAY SORT
    By MikeTrader in forum Power Basic
    Replies: 9
    Last Post: 28-08-2009, 22:57
  3. TBJ: little section for next issue
    By ErosOlmi in forum Suggest new articles
    Replies: 2
    Last Post: 27-07-2008, 09:12
  4. PCOPY! Issue #70 now available.
    By MystikShadows in forum PCOPY!
    Replies: 5
    Last Post: 20-06-2008, 20:50

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •