From e24c41a83621d789131155124bff0a2dee4bd22f Mon Sep 17 00:00:00 2001 From: sliceofcode Date: Sun, 25 Sep 2016 12:18:07 -0700 Subject: [PATCH] document new bitwise update assignment operators --- docs/reference.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/reference.md b/docs/reference.md index 37e7871e..ce34721b 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -55,9 +55,9 @@ variable, or shadow an existing one. ## Update Assignment -`+=`, `-=`, `/=`, `*=`, `%=`, `..=`, `or=`, `and=` operators have been added -for updating and assigning at the same time. They are aliases for their -expanded equivalents. +`+=`, `-=`, `/=`, `*=`, `%=`, `..=`, `or=`, `and=`, `&=`, `|=`, `>>=`, and +`<<=` operators have been added for updating and assigning at the same time. +They are aliases for their expanded equivalents. ```moon x = 0 @@ -68,6 +68,12 @@ s ..= "world" b = false b and= true or false + +p = 50 +p &= 5 +p |= 3 +p >>= 3 +p <<= 3 ``` ## Comments