mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
documentation of v += e
This commit is contained in:
parent
dfe0768fa1
commit
016a164bb6
2 changed files with 17 additions and 0 deletions
3
NEWS
3
NEWS
|
@ -277,6 +277,9 @@ New Functionality
|
|||
|
||||
- Bro now supports PPPoE over QinQ.
|
||||
|
||||
- An expression of the form v += e will append the value of the expression
|
||||
e to the end of the vector v (of course assuming type-compatbility).
|
||||
|
||||
Changed Functionality
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -599,6 +599,20 @@ Here is a more detailed description of each type:
|
|||
|
||||
|v|
|
||||
|
||||
A particularly common operation on a vector is to append an element
|
||||
to its end. You can do so using:
|
||||
|
||||
.. code:: bro
|
||||
|
||||
v += e;
|
||||
|
||||
where if e's type is ``X``, v's type is ``vector of X``. Note that
|
||||
this expression is equivalent to:
|
||||
|
||||
.. code:: bro
|
||||
|
||||
v[|v|] = e;
|
||||
|
||||
Vectors of integral types (``int`` or ``count``) support the pre-increment
|
||||
(``++``) and pre-decrement operators (``--``), which will increment or
|
||||
decrement each element in the vector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue