Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] SORT ARRAYPTR example

Author
Message
Bored of the Rings
13
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 9th Jul 2018 06:47
Thought I'd play around with more of IanM's Array commands and wanted to use pointers to do some sorting. Do what you like with it, good for learners and anyone who not sure how to use the commands.
Notice for this example, that I've padded out the string names for each example text by adding a "0" char. This is because when sorting xx1 and xx10, the resulting sort will be xx1 then xx10 then xx2,xx3 etc. So to get xx10.dds to the end I added a "0". But of course, I could just sort by ID, but for my real program I don't really want an ID , just a text field. Anyway, do what you like with it.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Login to post a reply

Server time is: 2018-07-23 03:18:05
Your offset time is: 2018-07-23 03:18:05