Blitz (62/218)

From:Jean-Marc GIGANDET
Date:13 Aug 2001 at 22:40:34
Subject:Re: sort and sortlist

Hello Steve

You can sort Lists with strings !!!
You just have to follow these rules :

Put a dummy .w in first place of your array type
Then simply use :
StringSort ArrayName(),SizeOf.TypeOfArray,Offset of the string you want to sort

Ex: Assume you want to sort an array using Generic type on NamGen field which is in 2nd place.
NEWTYPE .Generic
IdxGen.w ; Index Generic
NamGen.s ; Name Generic
NatGen.s ; Nationality Generic
DBiGen.l ; Birth Date Generic
DKiGen.l ; Death Date Generic
End NEWTYPE

Dim List LstGen.Generic(100)

StringSort LstGen(),SizeOf.Generic,2

Regards



jm.gigandet@libertysurf.fr
A1200T 030/28 + 68881, 8 Mb, HD 4.3Gb+635Mb+60Mb, Cd Toshiba 40x, M1438S, Deskjet 840C, UsR 33600.
iMac G3/350Mhz 128Mb, 6.3 Gb HD.
HURRICANE, TURRICAN, well, that's a good mix. Both should visit Redmond ...

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