Sujet : Re: Why Python When There Is Perl?
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.os.linux.advocacyDate : 24. Mar 2024, 07:56:38
Autres entêtes
Message-ID : <l69tkkFtmmgU2@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Sat, 23 Mar 2024 23:10:03 -0500, Physfitfreak wrote:
(A AND B) = (B AND A), and (A OR B) = (B OR A). They commute, so to
speak. But (A IMP B) doesn't commute. How would computer distinguish
between A and B then? Does it look at the ordering to see what comes
first as it goes from left to right, and gives the role of A to that
one? In that case The programmer needs to damn well know which one of
the condition he places to the left of IMP and which one to the right!
This is a new situation.
If I'm interpreting IMP as a bitwise comparison in Basic that comes down
to
A.bit0 <= B.bit0
A B
1 1 1
1 0 0
0 1 1
0 0 1
A B
1 1 1
0 1 1
1 0 0
0 0 1
Sort of awkward. I assume if you're evaluating two 8 or 16 bit values
you'd return on the first false match.
Curious. Basic isn't exactly Prolog.