From 647559d8d85c2f6be1b4a1fb9cca6dc3605a867c Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Wed, 27 Nov 2013 14:42:55 -0500 Subject: [PATCH] functions/randomint: clarify upper bound --- reference/functions/randomint.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reference/functions/randomint.markdown b/reference/functions/randomint.markdown index f4d7f676..b0f9c598 100644 --- a/reference/functions/randomint.markdown +++ b/reference/functions/randomint.markdown @@ -9,11 +9,14 @@ tags: [reference, data functions, functions, randomint] [%CFEngine_function_prototype(lower, upper)%] -**Description:** Returns a random integer between `lower` and `upper`. +**Description:** Returns a random integer between `lower` and *up to but not including* `upper`. The limits must be integer values and the resulting numbers are based on the entropy of the md5 algorithm. +The `upper` limit is excluded from the range. Thus `randomint(0, 100)` +will return 100 possible values, not 101. + The function will be re-evaluated on each pass if it is not restricted with a context class expression as shown in the example.