@ho121 在你说的这个 context 里, 肯定是非红即黑, 但是 either A or B 有可能判定 4 种情况的结果, 就是 AB 分别为 TT, TF, FF, FT, A xor B 可以根据这四种输入来做出判断.
这个问题的由来是, 我在公司做了个东西, 简单说, 就是个用户的输入判断, 有 4 个输入框, 分两组(A B) (C D), 要求是要么 AB 都填, 要么 CD 都填, 当然全空或者穿插缺项, E.g. (AC or BD) 是要提示错误.
然后同事在使用中发现, 如果 ABCD 全填了, 我就处理 AB 被填的那个逻辑去了, 他觉得应该是提示错误信息, 我说这不是个 or 的关系吗, 他说, it is not an "or" relation, instead it is an "either-or" relation. 我说, 对啊, 那不也是 logical OR 吗? 他说 are you sure? it is XOR.. 我仔细一想, 人家说的对啊......
xuqd
2017-01-26 19:54:28 +08:00
Either[A,B]
Mes0
2017-01-26 20:37:16 +08:00
异或吧
circsqua
2017-01-26 20:39:23 +08:00
异或
laoyuan
2017-01-26 20:49:04 +08:00
要么 A 要么 B
yangff
2017-01-26 20:57:04 +08:00
这种情况说 Exactly one 或者 One and Only One 比较合适吧
至于 either 并不能很准确的表示二者之一这个意思……
loading
2017-01-26 20:57:16 +08:00
这个其实是英语题吧……
yangff
2017-01-26 21:01:50 +08:00
Determiner[edit] either Each of two. [from 9th c.] [quotations ▼] One or the other of two. [from 14th c.] [quotations ▼] (coordinating) Used before two or more **not necessarily exclusive possibilities separated by "or"** or sometimes by a comma. [quotations ▼]