summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/arith.yo10
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/Zsh/arith.yo b/Doc/Zsh/arith.yo
index 423e6c1bc..dd18ee720 100644
--- a/Doc/Zsh/arith.yo
+++ b/Doc/Zsh/arith.yo
@@ -93,8 +93,9 @@ cindex(arithmetic operators)
 cindex(operators, arithmetic)
 An arithmetic expression uses nearly the same syntax and
 associativity of expressions as in C.
-The following operators are supported (listed in decreasing order
-of precedence):
+
+In the native mode of operation, the following operators are supported
+(listed in decreasing order of precedence):
 
 startsitem()
 sitem(tt(PLUS() - ! ~ PLUS()PLUS() --))(unary plus/minus, logical NOT, complement, {pre,post}{in,de}crement)
@@ -142,6 +143,11 @@ sitem(tt(= PLUS()= -= *= /= %= &= ^= |= <<= >>= &&= ||= ^^= **=))(assignment)
 sitem(tt(,))(comma operator)
 endsitem()
 
+Note the precedence of exponentiation in both cases is below
+that of unary operators, hence `tt(-3**2)' evaluates as `tt(9)', not
+tt(-9).  Use parentheses where necessary: `tt(-(3**2))'.  This is
+for compatibility with other shells.
+
 cindex(mathematical functions, use of)
 cindex(functions, math, use of)
 Mathematical functions can be called with the syntax