diff --git a/doc/script-reference/types.rst b/doc/script-reference/types.rst index 3d6f74aef0..fe77ece90c 100644 --- a/doc/script-reference/types.rst +++ b/doc/script-reference/types.rst @@ -91,6 +91,10 @@ Here is a more detailed description of each type: type, but a unary plus or minus applied to a "count" results in an "int". + In addition, "count" types support bitwise operations. You can use + ``&``, ``|``, and ``^`` for bitwise ``and'', ``or'', and ``xor''. You + can also use ``~`` for bitwise (one's) complement. + .. bro:type:: double A numeric type representing a double-precision floating-point @@ -592,6 +596,9 @@ Here is a more detailed description of each type: The resulting vector of bool is the logical "and" (or logical "or") of each element of the operand vectors. + Vectors of type ``count`` can also be operands for the bitwise and/or/xor + operators, ``&``, ``|`` and ``^``. + See the :bro:keyword:`for` statement for info on how to iterate over the elements in a vector.