mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-13 23:28:53 +01:00
22 lines
406 B
Plaintext
22 lines
406 B
Plaintext
var a = 0
|
|
System.print(a) // expect: 0
|
|
a += 5
|
|
System.print(a) // expect: 5
|
|
a -= 1
|
|
System.print(a) // expect: 4
|
|
a *= 4
|
|
System.print(a) // expect: 16
|
|
a /= 2
|
|
System.print(a) // expect: 8
|
|
a <<= 8
|
|
System.print(a) // expect: 2048
|
|
a >>= 6
|
|
System.print(a) // expect: 32
|
|
a %= 3
|
|
System.print(a) // expect: 2
|
|
a ^= 4
|
|
System.print(a) // expect: 6
|
|
a |= 8
|
|
System.print(a) // expect: 14
|
|
a &= 6
|
|
System.print(a) // expect: 6 |