Hi Jafar,
Yes, in this case the column contains variable-length numbers, and the sort appears to left-justify the field; e.g. the result will contain something like:
1
10
11
2
3
...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Help Getting Started" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Newbie question...
I'm reading a CSV file, and want to pull a column out to sort, but in order to sort it (I think) I should be storing it as integer.
The code (without coercion) is:
where entries consists of lines of CSV values and ParseLine splits columns by a comma. The 9th column is the one I want to sort.
I'm unsure if there's an elegant way to do this using Unicon iteration, or if I need to manually kludge it?
Last edit: Anonymous 2017-12-28
As far as I remember, sort() knows how to sort strings, so you should be good to go. Did you try this and it didn't work?
View and moderate all "Help Getting Started" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Jafar,
Yes, in this case the column contains variable-length numbers, and the sort appears to left-justify the field; e.g. the result will contain something like:
1
10
11
2
3
...
Good afternoon,
On the line that you as below
On 29/12/17 01:54, noreply@in.sf.net wrote:
This will change the strings to integers and sort will sort on the
integer value
regards
Bruce Rennie
View and moderate all "Help Getting Started" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks, Bruce.
I'd been trying :integer everywhere with no luck...!