]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/operators.qc
operators &= and |=
[xonotic/gmqcc.git] / tests / operators.qc
index e440ec54d77ca1b322ac1abfe6ada7506d193b98..e1464e381c6b2740529c814f89ceb292791e9433 100644 (file)
@@ -51,4 +51,9 @@ void main() {
        v = '3 4 5';
        print(vtos(v *= 2), " = '6 8 10'\n");
        print(vtos(v /= 2), " = '3 4 5'\n");
+
+       // bit compounds
+       a = 1;
+       print(ftos(a |= 2), " = 3\n");
+       print(ftos(a &= 6), " = 2\n");
 }