mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   enzocreti (https://www.mersenneforum.org/forumdisplay.php?f=156)
-   -   which is the smallest even number... (https://www.mersenneforum.org/showthread.php?t=24915)

xilman 2020-07-05 08:40

[QUOTE=kriesel;549790]His programmer wife could have asked, why he came home one loaf short.
Buy a loaf (1), + if (they have any eggs) get 12 (loaves). 1+12=13.[/QUOTE]To which he would reply "you used the AND operator, not PLUS.

LaurV 2020-07-15 17:23

[QUOTE=xilman;549800]To which he would reply "you used the AND operator, not PLUS.[/QUOTE]
To which he should come with no loafs (1 and 12 = 0) :razz:

xilman 2020-07-15 19:20

[QUOTE=LaurV;550688]To which he should come with no loafs (1 and 12 = 0) :razz:[/QUOTE]logical AND , not bitwise AND

kruoli 2020-07-15 20:09

So 1 AND 12 = true?

xilman 2020-07-16 06:30

[QUOTE=kruoli;550707]So 1 AND 12 = true?[/QUOTE]

In Perl:

&buy ($have_eggs ? 12 : 1, $loaf)

retina 2020-07-16 06:51

[QUOTE=xilman;550747][QUOTE=kruoli;550707]So 1 AND 12 = true?[/QUOTE]

In Perl:

&buy ($have_eggs ? 12 : 1, $loaf)[/QUOTE]Where is the AND?

LaurV 2020-07-18 08:54

[QUOTE=xilman;550701]logical AND , not bitwise AND[/QUOTE]
Every one with his domain, I work very close to metal :razz:


All times are UTC. The time now is 04:39.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.