Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation missing "option" in scope discussion #114

Open
kayavila opened this issue Apr 14, 2022 · 0 comments
Open

Documentation missing "option" in scope discussion #114

kayavila opened this issue Apr 14, 2022 · 0 comments

Comments

@kayavila
Copy link

The section under https://docs.zeek.org/en/master/scripting/basics.html#scope is a bit hard to understand. There's no discussion of variables declared with option, so for someone not very familiar with Zeek scripting, it's unclear how this relates to global or const. This is despite option being used in the example scripts above, and even (in the section explaining detect-MHR.zeek) referred to as constants.

Additional points that would be nice to have handled -

  • Are const and option different?
  • With const only redefinable before run-time, why would a script writer choose them rather than global? Is the sole purpose making sure they aren't altered again, or is there some memory benefit?
  • An example using global would be helpful, especially showing how it differs from option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant