[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: Paul Smith
Subject: Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison
Date: Sun, 28 Nov 2021 09:33:15 -0500
User-agent: Evolution 3.36.5-0ubuntu1

On Sun, 2021-11-28 at 08:24 +0100, Jouke Witteveen wrote:
> On the user side, strcmp could now probably be defined something like
> $(and $(intcmp $(words $1),$(words $2)),$(findstring x$1x,x$2x))

I don't think this is equivalent since a putative strcmp would also do
greater / less than comparison (like intcmp does).  Of course that
leads into all sorts of i18n / locale issues, but likely we'd just punt
(like C's strcmp does) and use ASCII ordering; we've already taken that
route elsewhere.

You can probably gin up something that works using $(sort ...) but it
seems tricky.  Anyway I'm not suggesting this be added right now but
just keeping options open for the future.

reply via email to

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