March 29, 2024, 01:46:50 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Text/CSV line sorter

Started by Brian, October 29, 2018, 12:49:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

October 29, 2018, 12:49:47 PM Last Edit: October 31, 2018, 05:01:18 AM by Brian Pugh
Hi,

This is a re-vamp of a program I wrote 6 years ago, for sorting lines of text. I reckon I probably wrote it to sort CSV files at the time, but it will also do text files. The program is written as a Project, so you may have to calafudge the project's path if you choose to compile, although I have included the exe in the zip

As you load up the source file, it counts the number of lines and also gives you the length of the longest line. I have set the variable that holds a line of text at 2048 bytes, which in my experience of testing is quite ample - I haven't gone over 400 bytes yet. In the unlikely event that a line exceeds 2048 bytes, you will have to expand the "text" and "header" variables, and re-compile

There is the option to not include the first line of a loaded file from sorting, as with CSV files the first line usually contains the text for the column headers

Very simple, and fast. Any suggestions / alterations, please inform me. Test CSV file included

Brian


Update 1.3 for Hallowe'en:

Andy thought that the size of the program's window was a bit too large. I agreed with him, as there is no interaction with the text on screen, really

He also mentioned that if a line had a space or spaces at the beginning, it wouldn't sort properly. It will now take the spaces out as a default, unless you choose not to

Text in Tooltips updated slightly

Added some colour to the screen

Included some bitmaps for the menu items, just to prettify it

Various other tweaks

Brian

Brian

Hi,

Just posted an update to this program. See first post

Brian

Andy

Brian,

It's a great program, very useful, I've added it to my IDE tools.

Thanks for sharing!

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.