[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison

From: Jouke Witteveen
Subject: Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison
Date: Sun, 28 Nov 2021 08:24:24 +0100

On Sun, Nov 28, 2021 at 5:02 AM Paul Smith <psmith@gnu.org> wrote:
> On Mon, 2021-11-15 at 20:49 +0100, Jouke Witteveen wrote:
> > It may be obscure, but how about we implement this as well? Sure, the
> > two-argument form of $(compare) will be a little inconsistent, but it
> > may be useful.
> I applied this three-patch set.
> I left the argument order as you originally specified it, and I added
> support for a 2-argument form that provides a trivial equality as
> above.  Maybe it's weird but I think it might be useful.
> The one change I made is changing the name of the function from
> "compare" to "intcmp": I felt "compare" was too generic.  Sometime we
> may want to introduce other types of comparison such as "strcmp" etc.
> Let me know what you think about this: I've only applied it to my local
> Git repository but not pushed it yet.

Hi Paul,

Thanks for sending this message, I would have otherwise prepared and
sent an updated patch series today. My plan was to expand to RHS in
the two-argument case if both values are equal. I assume you also
updated the documentation where needed? If so, there's nothing I have
to add and I'm looking forward to the new functionality.

On the user side, strcmp could now probably be defined something like
$(and $(intcmp $(words $1),$(words $2)),$(findstring x$1x,x$2x))

- Jouke

reply via email to

[Prev in Thread] Current Thread [Next in Thread]