bug-make
[Top][All Lists]
Advanced

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

Re: math expressions (was: Re: Tail call elimination)


From: Edward Welbourne
Subject: Re: math expressions (was: Re: Tail call elimination)
Date: Mon, 25 May 2020 16:53:57 +0000

Sam Kendall (25 May 2020 18:07) observed:
> If you have relational or equality operators, what does the boolean
> result look like? If the result is 1 for true and 0 for false, then
> you get a bad surprise: $(if $(math =,5,6),yes) expands to yes. If the
> answer is some nonempty string for true and empty string for false,
> then you can't do math on the result because it isn't a number. I
> think this has come up before in the discussion.

Definitely empty/non-empty for false and true; if you want to do
arithmetic, use an explicit $(if condition, 1, 0) expression rather than
taking for granted that true is 1 and false is 0 (an arbitrary
convention that happens to be widespread (and useful), not an inevitable
universal truth).

        Eddy.



reply via email to

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