Re: getopt()
| From: | Sascha Schumann | Date: | Mon, 27 Dec 1999 20:37:50 +0000 |
| Subject: | Re: getopt() | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-14068@lists.php.net to get a copy of this message | ||
On Mon, Dec 27, 1999 at 04:29:36PM -0500, rasmus@php.net wrote:
> > On Mon, Dec 27, 1999 at 10:52:39PM +0200, Zeev Suraski wrote:
> > > Does anybody happen to know whether it can be called more than once?
> >
> > Running twice through the argument list cannot work, because
> > getopt() maintains a static position indicator. There is no
> > way to reset the internal variables.
>
> I thought optind was the position indicator and that is an extern
The Single UNIX Specification II does not say whether this is
required to work. It works with our replacement function, but
I'm not convinced that this behaviour is portable.
--
Regards,
Sascha Schumann
Consultant