[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 15:45:05 +0100 |
On Sun, Nov 28, 2021 at 3:33 PM Paul Smith <psmith@gnu.org> wrote:
>
> 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 $1 x,x $2 x))
>
> 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.
This was only intended as a demonstration of how the two-argument
strcmp function could be implemented already (I initially forgot the
spaces around the 'x's). This would serve as a test for exact
string-wise equality.
If anything, this could mean that there is no reason to spend time on
adding strcmp now. It's all a digression and I agree with everything
you said about it.
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, (continued)
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/14
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/15
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/27
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Paul Smith, 2021/11/28
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison,
Jouke Witteveen <=
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Edward Welbourne, 2021/11/16
- Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison, Jouke Witteveen, 2021/11/16