Blitz (60/172)

From:Toby Zu�dveld
Date:11 Sep 2000 at 14:10:23
Subject:SortList

Hello,

OK, I'm using Lists and I need to sort the directory names I'm reading
in, in alphabetical order. SortList is absolutely useless. =]

The manual doesn't give enough info... so far my code is something like
this:

-=-

NEWTYPE.mynewtypestructure
firstword.w
dirname.s
End NEWTYPE

error=AddItem(entry())
\firstword=SizeOf.mynewtypestructure ; This is what the manual tells me
to do?

While MoreEntries
If AddItem(entry())
ifdirectorynamethenshoveitintothisentry{}
\firstword=Peek.w(&\dirname) ; This gives me a two digit numerical
value to sort the title under
EndIf
Wend

SortList entry(),entry(0)\pad

-=-

As far as I know this code is OK. But SortList doesn't change the order of
anything. Am I doing something wrong or is the command screwed, in
which case, anyone got a replacement?

Also, upon further tinkering, AddFirst doesn't work? I'm using it the same
as AddItem (with an ItemStackSize of twice the capable size of the list)
but it just adds it to the end of the list like AddItem does.

Help!

Kind regards

Toby Zu�dveld



Toby Zu�dveld

mailto:tzuyd@globalfreeway.com.au
icq:22571515



"Love is apt to remain an idea, like quality or democracy, that we wished
would go away so he could miss it." - Peter Schjeldahl, writer



According to http://www.thespark.com, I'm an EXPERIMENTER with an IQ of 170,
am 39% a bastard, 26% of a good lover, 74% of an ass, 80% un-telligent,
that's 47% greedy which is enough to spread a jar of mayonnaise in my
underwear and wear it for a month straight for $191, reach my first million
at 46 and end up with 3 children after having sex only 7 times. <sob>

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