Wiki source code of Rand

Last modified by Achraf El Kari on 2024/08/06 13:05

Hide last authors
Outhman Moustaghfir 1.1 1 = Introduction =
2
3 The Rand function creates a random whole number for various uses.
4
5 = Parameters =
6
Achraf El Kari 1.3 7 * Case 1 (1 param) => exponent (Type: Double): Determines the range of the random number. A higher exponent means a larger range.
8 * Case2 : (2 param) => Get a random number between two numbers
Outhman Moustaghfir 1.1 9
10 = Return ValueType: =
11
12 A whole number randomly generated and rounded.
13
14 = Uses =
15
Achraf El Kari 1.3 16 Case 1 : Get random number with 10 digits
17
Outhman Moustaghfir 1.1 18 {{code language="XML"}}
19 <TEST><xsl:value-of select="ixf:Rand('10')"></xsl:value-of></TEST>
20 {{/code}}
21
Achraf El Kari 1.3 22
23 Case 2 : Get a random number between 3 and 7
24
25 {{code language="XML"}}
26 <TEST><xsl:value-of select="ixf:Rand('3','7')"></xsl:value-of></TEST>
27 {{/code}}
28
Outhman Moustaghfir 1.1 29 == Note ==
30
31 The Rand function  provides diverse and unpredictable values.
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian