sorting linked lists?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

has any code been thrown around here regarding sorting linked lists? i have a list of a user defined structure i want to sort alphanumerically by one particular element in the structure, i.e.

Code: Select all

Structure debitStructure
    name.s
    date.s
    cost.s
EndStructure
NewList debitList.debitStructure()
i wish to sort (or create another list sorted) by name, date or cost.

Sorry if i sound a bit lazy, but i just wondered if any code regarding this has been posted before, just before i start getting my hands dirty. 're-inventing the wheel and all that'

--Kale

New to PureBasic and falling in Love! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Yes, just do a search.


----------
Visit the PB Resources Site at http://www.reelmediaproductions.com/pb
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.

Check out the PureBasic resource site, if i'm remembering correct there's a code snipp there that does the job.
http://www.reelmediaproductions.com/pb/
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.

http://www.reelmediaproductions.com/pb/ ... edlist.zip

regards,
Redacid
---
Viva Los Tioz!
registered user of PB3.40 on WinXP
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

thanks guys :)

--Kale

New to PureBasic and falling in Love! :)
Post Reply