Each time a event, order or action is matched or a pattern is found, it is possible to modify the value of the variables. This operation is always
done after the operation implicated by the use of the object are done. For example, if an event is realized, the operation on the variable is made
just after the verification of all the combo lines.
To associate the realization of an object with an operation on variable, an additional keyword was introduced: the 'Let' keyword. The argument of
this keyword is a string enclosed with '{' and '}' and using a regular, semicolon separated variable syntax.
Again, I think that a few short
examples are better than a long explanation:
I want to put the value 3 to $(myvar1) :
Let = { $(myvar) <- 3 ; }
I want to put the value 3 to $(myvar1) and to put 4 to $(my_other_var) :
Let = { $(myvar) <- 3 , $my_other_var <-4 ; }
I want to put $(var) plus $(var2) in $(my_var):
Let = { $(my_var) <- $(var1) + $(var2) ;}
I want every numerical character to disappear from variable $(my_var):
Let = { $(myvar) <-~ s/(\d+)//g ; }
I want to increment a counter called $(cpt):
Let = { $(cpt) +<- 1 ;}
As I said before, the 'Let' keyword is just to be added to a 'Order', 'Action', 'Event' or 'Pattern' definition, for example:
Pattern: Name = MyPattern ; Log = MyLog ; \
RegExp=Something; Let = { $(my_var) <- 0 ;} ;
You can use let to modify several variables in the same 'Let' statement, but you must used the comma ``,'' as a separator to each operation. For example: