Returning multiple values
| From: | Frank M. Kromann | Date: | Mon, 05 Mar 2001 21:51:58 +0000 |
| Subject: | Returning multiple values | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-340@lists.php.net to get a copy of this message | ||
Hi All
I just fixed the code for returning string values (ie. clist_get_text). It is now in CVS.
Andrei and I disagree on how functions should return (multiple) values, so we decided to ask the
list.
What fo you prefer:
$cLlist->get_pixtext($row, $col, $text, $spacing, $pixmap, $mask);
or
list($text, $spacing, $pixmap, $mask) = $cLlist->get_pixtext($row, $col);
In the first line of code the last 4 arguments will be passed byref and the values will be returned
in the same variables.
In the last line of code the function will return an array with the values.
- Frank