N Code Statements |
N Code Statementsassignmentident = expr ; block{ statement list } breakbreak ; The break exits a while or foreach iterator. declaredeclare ident inside expression ; The expression must evaluate to a map type. expressionexpr ; foreachforeach $ident inside ( expression ) statement Iteration only takes place when the expression's type is list. The local variable identified by 'ident' is set to the value of each list element in turn, and the statement is evaluated. Example:
Generates
ifif condition statement ; if condition statement else statement ; onSyntax: on `trigger' call name; When the trigger event occurs, call the function or filter that is named as the target identifier. Example: on udp() call gotAUdpPacket; The syntax of the trigger clause is the same as the trigger clause used in the filter declaration. Additionally, you can save the value of the trigger cookie by using:
The cookie associated with the created udp trigger is saved into the variable `saveCookie', which can be `off'd to delete that same trigger. offSyntax: off `cookie'; Remove the trigger described by the value of the cookie. Any further actions directed by the trigger will be disabled. recordrecord expression_list to ident ; whileThe while iterator tests a condition before executing the statement. When the condition fails, the loop is exited. Example:
Generates:
|
|