[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.
- Re: math expressions (was: Re: Tail call elimination), (continued)
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/24
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/24
- Re: Tail call elimination, Edward Welbourne, 2020/05/25
- Re: Tail call elimination, Tim Murphy, 2020/05/20
- Re: Tail call elimination, Paul Smith, 2020/05/20
- Re: Tail call elimination, Pete Dietl, 2020/05/20
- math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/20
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/20
- Re: math expressions (was: Re: Tail call elimination), Edward Welbourne, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Sam Kendall, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination),
Edward Welbourne <=
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Tim Murphy, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/25
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/26