mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Migrate table-based for-loops to key-value iteration
This commit is contained in:
parent
41c7b229d3
commit
01d303b480
36 changed files with 150 additions and 153 deletions
11
NEWS
11
NEWS
|
@ -31,6 +31,17 @@ New Functionality
|
|||
|
||||
- Support for decapsulating VXLAN tunnels.
|
||||
|
||||
- The for-loop syntax now allows for iterating over key-value pairs of tables.
|
||||
Previously, a separate lookup within the loop was required to obtain the
|
||||
value at a given index/key, but now this works::
|
||||
|
||||
local t: table[count] of string = table();
|
||||
t[1] = "hello";
|
||||
t[55] = "goodbye";
|
||||
|
||||
for ( key, value in t )
|
||||
print key, value;
|
||||
|
||||
Changed Functionality
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue