[Bro] appending to a vector

Scott Runnels srunnels at gmail.com
Wed Jun 19 09:24:06 PDT 2013


Hi David,

I think you're looking for something like this:


const foo: vector of double = vector() &redef;
foo[|foo|] = 42.0;
print(foo);

v/r
Scott

Scott Runnels



On Wed, Jun 19, 2013 at 12:14 PM, David Mandelberg <david at mandelberg.org>wrote:

> Hi,
>
> What's the recommended way to append to a vector? The documentation
> says vectors are like tables, so I tried the below code, but it gives
> some errors.
>
> const foo: vector of double = vector() &redef;
>
> redef foo += {
>      [|foo|] = 42.0
> };
>
> print(foo);
>
> --
> David Eric Mandelberg / dseomn
> http://david.mandelberg.org/
> _______________________________________________
> Bro mailing list
> bro at bro-ids.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20130619/83bd90c6/attachment.html 


More information about the Bro mailing list