changeset 27975:6931d95d1967

Use "!=" in preference to "~=" everywhere in code. * expr.txi: Combine two lines for clarity. * ov-fcn-handle.cc (make_fcn_handle): In BIST test, put test for "!=" ahead of test for "~=" to indicate desirability. * lex.ll: List "!=" CMD_OR_OP before "~=" to indicate desirability. * compare_versions.m: Combine @item entries for "!=" and "~=" as they both represent "not equal".
author Rik <rik@octave.org>
date Tue, 21 Jan 2020 11:16:33 -0800
parents c014440a2935
children cd3999e62492
files doc/interpreter/expr.txi libinterp/octave-value/ov-fcn-handle.cc libinterp/parse-tree/lex.ll scripts/miscellaneous/compare_versions.m
diffstat 4 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/expr.txi	Tue Jan 21 19:52:17 2020 +0100
+++ b/doc/interpreter/expr.txi	Tue Jan 21 11:16:33 2020 -0800
@@ -1550,8 +1550,7 @@
 @samp{:}
 
 @item relational
-@samp{<} @samp{<=} @samp{==} @samp{>=} @samp{>} @samp{!=}
-@samp{~=}
+@samp{<} @samp{<=} @samp{==} @samp{>=} @samp{>} @samp{!=} @samp{~=}
 
 @item element-wise "and"
 @samp{&}
--- a/libinterp/octave-value/ov-fcn-handle.cc	Tue Jan 21 19:52:17 2020 +0100
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Tue Jan 21 11:16:33 2020 -0800
@@ -1856,8 +1856,8 @@
 %!      "<=", "le";
 %!      "==", "eq";
 %!      ">=", "ge";
+%!      "!=", "ne";
 %!      "~=", "ne";
-%!      "!=", "ne";
 %!      "**", "mpower";
 %!      "~", "not";
 %!      "!", "not";
--- a/libinterp/parse-tree/lex.ll	Tue Jan 21 19:52:17 2020 +0100
+++ b/libinterp/parse-tree/lex.ll	Tue Jan 21 11:16:33 2020 -0800
@@ -1590,8 +1590,8 @@
 ".**" { CMD_OR_OP (".**", EPOW, false); }
 "<="  { CMD_OR_OP ("<=", EXPR_LE, true); }
 "=="  { CMD_OR_OP ("==", EXPR_EQ, true); }
+"!="  { CMD_OR_OP ("!=", EXPR_NE, false); }
 "~="  { CMD_OR_OP ("~=", EXPR_NE, true); }
-"!="  { CMD_OR_OP ("!=", EXPR_NE, false); }
 ">="  { CMD_OR_OP (">=", EXPR_GE, true); }
 "&"   { CMD_OR_OP ("&", EXPR_AND, true); }
 "|"   { CMD_OR_OP ("|", EXPR_OR, true); }
--- a/scripts/miscellaneous/compare_versions.m	Tue Jan 21 19:52:17 2020 +0100
+++ b/scripts/miscellaneous/compare_versions.m	Tue Jan 21 11:16:33 2020 -0800
@@ -60,13 +60,9 @@
 ## @qcode{">="}
 ## greater than or equal to
 ##
-## @item
-## @qcode{"!="}
+## @item @qcode{"!="}, @qcode{"~="}
 ## not equal
 ##
-## @item
-## @qcode{"~="}
-## not equal
 ## @end itemize
 ##
 ## Note that version @qcode{"1.1-test2"} will compare as greater than