User Tools

Site Tools


reference:spamrules_statement_random

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reference:spamrules_statement_random [2018/11/14 10:45] (current)
Line 1: Line 1:
 +======Spam Filter Rules: Random======
 +^Statement ​ |Random |
 +^Version ​ |2.5.2+ |
 +^Purpose ​ |Generates a random number |
 +
 +The **Random** statement requires a lower and higher numeric bound, and a variable to assign the result to, in the format
 +  Random <​lower>​ <​higher>​ <​variable>​
 +
 +  *The variable gets set to an integer number between the lower and higher bounds, inclusive
 +  *If the <​higher>​ value is lower than the <​lower>​ value, the two numbers are swapped
 +
 +=====Example=====
 +<​code>​
 +Random 5 10 val
 +
 +#${val} contains one of 5, 6, 7, 8, 9, 10
 +</​code>​
  
reference/spamrules_statement_random.txt ยท Last modified: 2018/11/14 10:45 (external edit)