cvs: phpdoc-pl /reference/math/functions srand.xml

From: Date: Tue, 18 Apr 2006 07:58:23 +0000
Subject: cvs: phpdoc-pl /reference/math/functions srand.xml
Groups: php.doc.pl 
Request: Send a blank email to doc-pl+get-889@lists.php.net to get a copy of this message
leszek Tue Apr 18 07:58:23 2006 UTC Modified files: /phpdoc-pl/reference/math/functions srand.xml Log: [leszek] - updated to EN 1.8 http://cvs.php.net/viewcvs.cgi/phpdoc-pl/reference/math/functions/srand.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-pl/reference/math/functions/srand.xml diff -u phpdoc-pl/reference/math/functions/srand.xml:1.7 phpdoc-pl/reference/math/functions/srand.xml:1.8 --- phpdoc-pl/reference/math/functions/srand.xml:1.7 Thu Jun 20 01:44:32 2002 +++ phpdoc-pl/reference/math/functions/srand.xml Tue Apr 18 07:58:23 2006 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-2"?> -<!-- EN-Revision: 1.4 Maintainer: qrak Status: ready --> -<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.8 Maintainer: qrak Status: ready --> +<!-- $Revision: 1.8 $ --> <refentry id="function.srand"> <refnamediv> <refname>srand</refname> @@ -10,34 +10,39 @@ <title>Opis</title> <methodsynopsis> <type>void</type><methodname>srand</methodname> - <methodparam><type>int</type><parameter>ziarno</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>ziarno</parameter></methodparam> </methodsynopsis> <para> - Inicjuje generator liczb losowych za pomoc± ziarna - <parameter>ziarno</parameter>. - <informalexample> + Inicjuje generator liczb losowych za pomoc± argumentu + <parameter>ziarno</parameter>. W PHP 4.2.0 i nowszych, argument + <parameter>ziarno</parameter> jest opcjonalny - domy¶lnie generator + inicjowany jest warto¶ci± losow±. + </para> + <para> + <example> + <title>Przyk³ad u¿ycia <function>srand</function></title> <programlisting role="php"> <![CDATA[ -// naziarnij mikrosekundami -function make_seed() { +<?php +// zainicjalizuj mikrosekundami +function make_seed() +{ list($usec,$sec) = explode(" ", microtime()); return ((float)$sec+(float)$usec) * 100000; } srand(make_seed()); $randval = rand(); +?> ]]> </programlisting> - </informalexample> + </example> </para> - <note> - <para> - Pocz±wszy od PHP 4.2.0, nie trzeba ju¿ inicjowaæ generatora liczb - losowych przed u¿yciem. - </para> - </note> + &note.randomseed; <simpara> - Patrz tak¿e: <function>rand</function>, - <function>getrandmax</function>, <function>mt_srand</function>. + Patrz tak¿e: + <function>rand</function>, + <function>getrandmax</function> i + <function>mt_srand</function>. </simpara> </refsect1> </refentry>

« previous php.doc.pl (#889) next »