summaryrefslogtreecommitdiff
path: root/chapter17/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'chapter17/README.md')
-rw-r--r--chapter17/README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/chapter17/README.md b/chapter17/README.md
index 331cdc3d..cdbca21b 100644
--- a/chapter17/README.md
+++ b/chapter17/README.md
@@ -25,7 +25,12 @@ Allow pre-increment for identifiers only, for now: `--pc`.
## Operator assignment
Along the same lines as post-increment, we now allow `op=` assignment
-with semantics similar to other languages.
+on local variables with semantics similar to other languages. The supported
+operators are `+=`, `-=`, `*=`, `/=`, `&=`, `|=`, `^=`, `<<=`, `>>=`, and `>>>=`.
+Bitwise and shift assignments require integer operands; `>>=` preserves the sign
+while `>>>=` shifts in zeros. The assignment evaluates its right-hand side once,
+stores the result narrowed to the variable's type, and yields that stored value.
+Assignments associate right-to-left, as in `x |= y <<= 2`.
`x += y`
@@ -159,4 +164,4 @@ for( int i=0; i<ary#; i++ )
if( ary[i]==e )
return i;
return -1;
-``` \ No newline at end of file
+```