Blitz (23/218)

From:Steve Hargreaves
Date:4 Aug 2001 at 00:21:46
Subject:Re: sort and sortlist

On 04-Aug-01, John Mason said -

>JM I came up with a way of doing this just recently -- I added a .b to the
>JM beginning of the newtype (hopefully you're talking about a list of
>JM newtypes) and when I added items to the list I also added the integer
>JM value of the first character of the string into this .b. Then use
>JM SortList to sort by that value. This works, but it doesn't sort past the
>JM first character of the string. I suppose you could add the remaining
>JM characters as values 1/10th the values for the first character, ie:

>JM sortvalue = asc(1stchar)
>JM sortvalue + asc(2ndchar/10)
>JM sortvalue + asc(3rdchar/100)

I'd been experimenting with something along those lines, but I didn't think of
dividing the results of each successive character. (I also tried using the Cvl
command, but failed miserably)

I'll have to retry again using the divide by method to see if I can get
anywhere.

Regards

Steve.
========================================================
//Amiga 1200, '060/50, OS3.9, EZ-Tower, Dopus,
// PC Keyboard W EZ-Key, 56K modem, 2+16 Meg,
\\ // NEC 2A Multisync, Logic 3 SpeedMouse, HPDJ610C,
\\/ Sega Controller, & no hair.

=========================================================
A fool-proof method for sculpting an elephant: first, get a huge
block of marble; then you chip away everything that doesn't look
like an elephant.

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie