[
https://bro-tracker.atlassian.net/browse/BIT-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johanna Amann updated BIT-1237:
-------------------------------
Status: Reopened (was: Closed)
Resolution: (was: Fixed)
> 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
> Labels: BroScript
>
> During one of the scripting exercises I noticed odd behavior with items
> declared in the global scope:
> {code}
> ############################# 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
> #############################
> {code}
> 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
(v7.0.0-OD-08-002#70107)
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev