Random number generator (included): Difference between revisions

m
Fix incorrect function name, remove incorrect notice, & add note.
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
m (Fix incorrect function name, remove incorrect notice, & add note.)
Line 208:
 
=={{header|Common Lisp}}==
{{incorrect|Common Lisp|Use CLHS as reference. Function rand is incorrect it should be random .}}
The easiest way to generate random numbers in Common Lisp is to use the built-in rand function after seeding the random number generator. For example, the first line seeds the random number generator and the second line generates a number from 0 to 9
<syntaxhighlight lang="lisp">(setf *random-state* (make-random-state t))
(randrandom 10)</syntaxhighlight>
[https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node133.html Common Lisp: The Language, 2nd Ed.] does not specify a specific random number generator algorithm, nor a way to use a user-specified seed.
 
=={{header|D}}==
14

edits