在 Mathematica 中,“或”看起来是用双竖线定义的。请参阅https://reference.wolfram.com/language/ref/Or.html或https://mathematica.stackexchange.com/a/119763。
在 Mathics 2.1.0 中,这似乎不起作用:
In[16]:= If[1<0 || 2<3 || 3<4, 0, 1]
Syntax::sntxf: "If[1<0 " cannot be followed by " 2<3 3<4, 0, 1]" (line 1 of "<stdin>").
而“或”这个词似乎有效:
In[16]:= If[1<0 or 2<3 or 3<4, 0, 1]
Out[16]= 1
那么我必须||
在 Mathematica 和or
Mathics 中使用,还是我弄错了?