cvs: phpdoc /en/reference/math/functions mt-rand.xml rand.xml

From: Date: Tue, 22 Jul 2008 10:15:51 +0000
Subject: cvs: phpdoc /en/reference/math/functions mt-rand.xml rand.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1896@lists.php.net to get a copy of this message
vrana Tue Jul 22 10:15:51 2008 UTC Modified files: /phpdoc/en/reference/math/functions mt-rand.xml rand.xml Log: No such PHP constant RAND_MAX http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/math/functions/mt-rand.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc/en/reference/math/functions/mt-rand.xml diff -u phpdoc/en/reference/math/functions/mt-rand.xml:1.16 phpdoc/en/reference/math/functions/mt-rand.xml:1.17 --- phpdoc/en/reference/math/functions/mt-rand.xml:1.16 Sat May 3 16:48:28 2008 +++ phpdoc/en/reference/math/functions/mt-rand.xml Tue Jul 22 10:15:50 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <refentry xml:id="function.mt-rand" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>mt_rand</refname> @@ -30,9 +30,9 @@ If called without the optional <parameter>min</parameter>, <parameter>max</parameter> arguments <function>mt_rand</function> returns a pseudo-random value between 0 and - <constant>RAND_MAX</constant>. If you want a random number - between 5 and 15 (inclusive), for example, use <literal>mt_rand - (5, 15)</literal>. + <function>mt_getrandmax</function>. If you want a random number + between 5 and 15 (inclusive), for example, use <literal>mt_rand(5, + 15)</literal>. </simpara> &note.randomseed; @@ -53,7 +53,7 @@ <term><parameter>max</parameter></term> <listitem> <para> - Optional highest value to be returned (default: RAND_MAX) + Optional highest value to be returned (default: <function>mt_getrandmax</function>) </para> </listitem> </varlistentry> @@ -64,7 +64,7 @@ &reftitle.returnvalues; <para> A random integer value between <parameter>min</parameter> (or 0) - and <parameter>max</parameter> (or RAND_MAX, inclusive) + and <parameter>max</parameter> (or <function>mt_getrandmax</function>, inclusive) </para> </refsect1> <refsect1 role="changelog"> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/math/functions/rand.xml?r1=1.20&r2=1.21&diff_format=u Index: phpdoc/en/reference/math/functions/rand.xml diff -u phpdoc/en/reference/math/functions/rand.xml:1.20 phpdoc/en/reference/math/functions/rand.xml:1.21 --- phpdoc/en/reference/math/functions/rand.xml:1.20 Fri May 2 09:55:37 2008 +++ phpdoc/en/reference/math/functions/rand.xml Tue Jul 22 10:15:50 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.20 $ --> +<!-- $Revision: 1.21 $ --> <refentry xml:id="function.rand" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>rand</refname> @@ -20,16 +20,16 @@ If called without the optional <parameter>min</parameter>, <parameter>max</parameter> arguments <function>rand</function> returns a pseudo-random integer between 0 and - <constant>RAND_MAX</constant>. If you want a random number - between 5 and 15 (inclusive), for example, use <literal>rand (5, + <function>getrandmax</function>. If you want a random number + between 5 and 15 (inclusive), for example, use <literal>rand(5, 15)</literal>. </simpara> <note> <simpara> - On some platforms (such as Windows) <constant>RAND_MAX</constant> + On some platforms (such as Windows), <function>getrandmax</function> is only 32768. If you require a range larger than 32768, specifying <parameter>min</parameter> and <parameter>max</parameter> will allow - you to create a range larger than RAND_MAX, or consider using + you to create a range larger than this, or consider using <function>mt_rand</function> instead. </simpara> </note> @@ -53,7 +53,7 @@ <term><parameter>max</parameter></term> <listitem> <para> - The highest value to return (default: RAND_MAX) + The highest value to return (default: <function>getrandmax</function>) </para> </listitem> </varlistentry> @@ -64,7 +64,7 @@ &reftitle.returnvalues; <para> A pseudo random value between <parameter>min</parameter> - (or 0) and <parameter>max</parameter> (or RAND_MAX, inclusive). + (or 0) and <parameter>max</parameter> (or <function>getrandmax</function>, inclusive). </para> </refsect1> <refsect1 role="changelog">

« previous php.doc.cvs (#1896) next »