On Mon, May 14, 2018 at 3:27 PM, Leslie Turriff <[email protected]> wrote:
> It's frustration, really; I didn't mean to be sharp. It seems as
> if much of
> the time, things that seem straightforward, in ooRexx turn out to require
> considerable additional unexpected coding.
>
> It is written this way because it gives you the flexibility to determine
how things work rather than waiting for a developer to decide some feature
you want is more important than some other feature that somebody else
wants. Frankly, a request for a NumericColumnComparator would fall pretty
far down the list of things I might work on, but once you have written one
yourself, you can reuse it over and over again in as many places you want.
Here is a quick version (untested):
::CLASS 'NumericColumnComparator' MIXINCLASS Comparator Public
::METHOD initexpose start length precisionuse strict arg start,
length, precision = (digits())
::METHOD compareexpose start length precision
use strict arg left, right
numeric digits precision-- the sign from the subtraction result is the
correct return-- value for an ordering comparison.return
sign(substr(left, start, length) - substr(right, start, length))
> On 2018-05-14 14:14:01 Rick McGuire wrote:
> > And as I have already pointed out, that is documentation for something
> that
> > does not apply for sorting. That is the documentation for the string
> > comparison operators, not the string compareTo() method, which contains
> no
> > such reference. I was going to write one of these for you, but I think
> > I'll save the effort for somebody who asks questions with a little less
> > snark.
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel