Re: <void> rendering, multi-proto's
| From: | Jeroen van Wolffelaar | Date: | Sun, 12 Aug 2001 22:08:54 +0000 |
| Subject: | Re: <void> rendering, multi-proto's | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969337034@lists.php.net to get a copy of this message | ||
> > + If a function requires no arguments, use <void/> in stead of
> > + <parameter>void</parameter>, since the former renders to " ()",
> > + and not " (void)", the former is of course more correct.
> > +
> > + If a function has an undefined return-value, use 'void'.
>
> <parameter>void</parameter> is the correct syntax, because <void/> looks
> very ugly in the renderd output.
I just threw away a mail about that we should change the
function (void)
prototype to
function ()
, but then I saw that it was already okay with <void/>.
(void) to indicate no-args is really ugly, IMO, and wrong too. void as
return-value is okay, but to indicate no-args?? it is common to have a list
of arguments, there are no arguments -> empty list.
Anyway, _IF_ (void) would be the correct rendering, change the
html-common.dsl to output " (void)" in stead of " ()". That's the
appropriate way, this <parameter>void</parameter> thing is an ugly hack
(IMHO uglier than Jani's/Tom's rand() hack).
>
> > + 14. In a prototype, if there are multiple - really distinct -
> > + possibilities, simply make it two! See math.xml:min() for an
example.
>
> mixed?
See min() for example, mixed is not appropriate there.
>
> -Egon
>
> --
> All known books about PHP and related books:
>http://php.net/books.php
> Concert Band of the University of Hohenheim:
> http://www.concert-band.de/
> First and second bestselling book in German:
> http://www.php-buch.de/