The new value comparison operators will report an error if either operand in the comparison contains more than one value, so using them expedites detection of the error.
如果比较的一个操作数包含多个值,新的值比较运算符将报告错误,因此使用这些运算符可以迅速有效地检测错误。
However, an error will be raised when using an equivalent of the modulus and remainder operators on floating values, as these support only integer values.
但是,如果对浮点数使用取模和求余数操作符,则会产生错误,因为这些操作符只支持整数。
Like the previous set of test operators, comparison test operators are a handy way to perform error checking or to test values against another value.
与前一组测试操作符一样,比较测试操作符是执行错误检查或根据另一个值测试值的简便方法。
应用推荐