in reply to sorting an array with decimal points
The implicit specification of the OP seems unclear in one respect: How should a version number of, e.g., '4.20' compare to '4.2'? Is '4.20' equal to or greater than '4.2'? Is a version number like '4.20' even possible in levW's application? (Update: And are these even version numbers?)
Except for kcott's solution (update: and Laurent_R's solution), all the solutions presented in this thread seem to use a numeric sort comparison, which will sort '4.2' adjacent to '4.20'.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sorting an array with decimal points
by Laurent_R (Canon) on Jan 15, 2018 at 19:52 UTC | |
by AnomalousMonk (Archbishop) on Jan 15, 2018 at 22:35 UTC |