Peter Kaloroumakis created BIT-1237:
---------------------------------------
Summary: Bro script declaration ordering
Key: BIT-1237
URL: https://bro-tracker.atlassian.net/browse/BIT-1237
Project: Bro Issue Tracker
Issue Type: Problem
Components: Bro
Affects Versions: 2.3
Environment: Bro con training VM
Reporter: Peter Kaloroumakis
Priority: Trivial
During one of the scripting exercises I noticed odd behavior with items
declared in the global scope:
############################# error.bro
not working:
------------------------------------------------
local test_var = "test_var";
function test_1()
{
print "test_1";
}
print test_var;
test_1();
>>> Output:
error in ./test.bro, line 3: syntax error, at or near "test_1"
############################# working.bro
working:
------------------------------------------------
function test_1()
{
print "test_1";
}
local test_var = "test_var";
print test_var;
test_1();
>>> Output:
test_var
test_1
#############################
To declare a function, bro 2.3 forced me to do it at the top of the file. On
the exercise with the redef of the grid ftp size variable I noticed the same
issue with redef, it required me to put the redef at the very top of the file.
Robin asked me to open a ticket and mentioned this was low priority.
--
This message was sent by Atlassian JIRA
(v6.4-OD-04-006#64001)
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev