On Fri, 27 Jan 2023 at 03:31, rbowman <bow...@montana.com> wrote:
>
> On Thu, 26 Jan 2023 04:10:30 +1100, Chris Angelico wrote:
>
>
> > BASIC was like that too, although it (at least, the versions I used in
> > my childhood) didn't have "True" and "False", you just got the actual
> > values -1 and 0. They were the other way around compared to what you're
> > saying here though.
>
> I've see header files from people with boolean envy that are something
> like
>
> #define FALSE  0
> #define TRUE ~FALSE
>

Yeah, that's the same logic that BASIC uses: false is zero, and true
is the all-ones integer (which, interpreted as a two's complement
signed number, is -1).

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to