pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2016-08-08
2016-08-08 13:14:46 by Martin Nilsson <nilsson@fastmail.com>
88d6b1ad57a82356a9db2b272f53dc73a6f04ba5 (
19
lines) (+
18
/-
1
)
[
Show
|
Annotate
]
Branch:
8.1
More documentation.
2094:
*! *! Prototype for the randomness generating function. *!
-
*! Override this symbol to implement a
useable
class.
+
*! Override this symbol to implement a
usable
class.
*/ PIKEFUN string(8bit) random_string(int(0..)) prototype;
2177:
/*! @decl mixed random(array|multiset x) *! Returns a random element from @[x].
+
*!
+
*! @throws
+
*! Throws an exception if the array or multiset is empty.
*/ PIKEFUN mixed random(array a)
2198:
/*! @decl array random(mapping m) *! Returns a random index-value pair from the mapping.
+
*!
+
*! @array
+
*! @elem mixed 0
+
*! The index of the mapping entry.
+
*! @elem mixed 1
+
*! The value f the mapping entry.
+
*! @endarray
+
*!
+
*! @throws
+
*! Throws an exception if the mapping is empty.
*/ PIKEFUN array random(mapping m) {
2227:
*! If random is called with an object, @[lfun::_random] will be *! called in the object. *!
+
*! @throws
+
*! Throws an exception if the object doesn't have a _radnom method.
+
*!
*! @seealso *! @[lfun::_random()] */