You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 toglobal
orconst
. This is despiteoption
being used in the example scripts above, and even (in the section explainingdetect-MHR.zeek
) referred to as constants.Additional points that would be nice to have handled -
const
andoption
different?const
only redefinable before run-time, why would a script writer choose them rather thanglobal
? Is the sole purpose making sure they aren't altered again, or is there some memory benefit?global
would be helpful, especially showing how it differs fromoption
.The text was updated successfully, but these errors were encountered: