Re: rand function definition
| From: | Hartmut Holzgraefe | Date: | Thu, 14 Mar 2002 10:00:57 +0000 |
| Subject: | Re: rand function definition | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969343055@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
Currently rand shows up as: int rand ( void)int rand ( int min, int max) at http://www.php.net/manual/en/function.rand.php This is extremely ugly. Ca we not do: int rand([int min, int max])it is 'only' missing a linebreak the problem is that we right now have no support for groups of optional parameters that belong together. it is no problem to have int rand ( [int min [, int max]]) but not int rand ( [int min, int max]) i have it working in XSLT with markup like this:
<methodsynopsis>
<type>int</type><methodname>rand</methodname>
<methodparam choice="opt">
<type>int</type><parameter>min</parameter>
</methodparam>
<methodparam>
<type>int</type><parameter>max</parameter>
</methodparam>
</methodsynopsis>
<simpara>
note that only the first parameter has the choice attribute set
(not sure if this is already checked in ...)
but i don't want to put any more effort into the DSSSl stuff
so the only way to express that a function has either none
or two paramters is still to have two prototypes in the XML
source
but i'll try to take care of the missing linebreak between the
two <methodsynopsis> blocks
--
Hartmut Holzgraefe hartmut@six.de http://www.six.de
+49-711-99091-77
Wir stellen für Sie aus auf der CeBIT 2002 und freuen uns
in Halle 6 auf Ihren Besuch am Stand H 18