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

Bored of the Rings
User Banned
Posted: 9th Jul 2018 06:47 Edited at: 2nd Dec 2018 05:16
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 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: 2024-02-23 20:12:35
Your offset time is: 2024-02-23 20:12:35