]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Document use of comparison operators in expressions
authorNick Clifton <nickc@redhat.com>
Tue, 12 Jun 2001 15:57:25 +0000 (15:57 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 12 Jun 2001 15:57:25 +0000 (15:57 +0000)
gas/ChangeLog
gas/doc/as.texinfo

index 140516ca1681a1a7704a0c7f661d990727345a48..105e8875e4161db3950c03d2d6f2289f24bffde5 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * doc/as.texinfo (Infix Ops): Document that comparison and
+       combiner operators can be used as infix operators.
+
 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * config/tc-arm.c: Fix test for overlow of literal pool.
index 6cc236c6c3842e23374f8880169a05f965c69678..01b3c50015072b9d75504db43999e755142ecd61 100644 (file)
@@ -3137,7 +3137,7 @@ Intermediate precedence
 @end table
 
 @item
-Lowest Precedence
+Low Precedence
 
 @table @code
 @cindex addition, permitted arguments
@@ -3157,6 +3157,41 @@ result has the section of the left argument.
 If both arguments are in the same section, the result is absolute.
 You may not subtract arguments from different sections.
 @c FIXME is there still something useful to say about undefined - undefined ?
+
+@cindex comparison expressions
+@cindex expressions, comparison
+@item  ==
+@dfn{Is Equal To}
+@item <>
+@dfn{Is Not Equal To}
+@item <
+@dfn{Is Less Than}
+@itemx >
+@dfn{Is Greater Than}
+@itemx >=
+@dfn{Is Greater Than Or Equal To}
+@itemx <=
+@dfn{Is Less Than Or Equal To}
+
+The comparison operators can be used as infix operators.  A true results has a
+value of -1 whereas a false result has a value of 0.   Note, these operators
+perform signed comparisons.
+@end table
+
+@item Lowest Precedence
+
+@table @code
+@item &&
+@dfn{Logical And}.
+
+@item ||
+@dfn{Logical Or}.
+
+These two logical operations can be used to combine the results of sub
+expressions.  Note, unlike the comparison operators a true result returns a
+value of 1 but a false results does still return 0.  Also note that the logical
+or operator has a slightly lower precedence than logical and.
+
 @end table
 @end enumerate