Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Sorting Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sorting Problem

    I have struck a problem with sorting - I am using ARRAY SORT.

    I am sorting a list of race horses into alphabetical order and all works okay.

    But now someone has named a horse <'tis Lovely> and I can't get it to ignore the apostrophe and sort on the first letter, the t.

    Can anyone offer some assistance as my nerwspaper list looks a bit rididulous with 'tis Lovely coming before Angus Bull.

    Brian.
    Brian.

  • #2
    Brian --

    I'd create a second string array, with the same number of elements as the original. Write a simple loop (FOR/NEXT or whatever) to copy all of the strings from one array to the other, but trim leading characters like the apostrophe as they are copied. Then do an ARRAY SORT on the new punctuation-less array, and TAGARRAY the original array so that it gets sorted into the same order.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited February 14, 2000).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      Thank you, Eric.

      I had instant success.

      Regards,
      Brian.


      ------------------
      Brian.

      Comment

      Working...
      X