Sort

Ken Ray kray at sonsothunder.com
Thu Aug 29 08:50:01 CDT 2002


One gotcha: don't forget to "set the wholeMatches to true" before you do
your lineoffset checks, otherwise you might get messed-up results.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Jan Schenkel" <janschenkel at yahoo.com>
To: <use-revolution at lists.runrev.com>
Sent: Thursday, August 29, 2002 7:00 AM
Subject: Re: Sort


> --- yves COPPE <yvescoppe at skynet.be> wrote:
> > Hi,
> >
> > Can you help me for the "sort lines" command.
> >
> > The sort lines is based on the US language.
> > When I sort lines in French, the lines beginning
> > with an accent as
> > "é" or "è" are at the end of the list.
> > Is it possible to obtain a sort based on
> > international sorting key ?
> >
>
> Hi Yves,
>
> One work-around that's always available, is to first
> convert the lines to capitals with the toUpper()
> function. This will get rid of the diacritical marks.
>
> If there is no built-in way to change the
> diacritical-sorting (couldn't find any right away in
> the docs), you could always:
>
>   put toUpper(sourceVar) into upperVar
>   put upperVar into sortVar
>   sort the lines of sortVar
>   repeat for each line theLine of sortVar
>     put line (lineOffset(theLine, upperVar)) of \
>     sourceVar & return after resultVar
>   end repeat
>   delete char -1 of resultVar
>
> And then resultVar should be pretty close to what you
> want. It will eat some memory of course...
>
> Hope this helped,
>
> Jan Schenkel.
>
> "As we grow older, we grow both wiser and more foolish
> at the same time."  (De Rochefoucald)
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list