help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getopt


From: Juergen Rose
Subject: Re: getopt
Date: Sun, 11 Oct 2009 11:00:38 +0200

Am Samstag, den 10.10.2009, 21:54 +0200 schrieb Jaroslav Hajek:
> On Sun, Oct 11, 2009 at 4:28 AM, Juergen Rose <address@hidden> wrote:
> > Am Samstag, den 10.10.2009, 12:12 -0400 schrieb John W. Eaton:
> >> On 10-Oct-2009, Ben Abbott wrote:
> >>
> >> | > If I try to write a function my_getopt, the testing of the options is
> >> | > probably not so hard. But how I can reset argv, that it after the call
> >> | > the call of my_getopt contains only the non option arguments, I have
> >> | > no
> >> | > idea.
> >> | > Juergen
> >> |
> >> | I have no good idea how to handle that problem.
> >>
> >> You would need to do something like
> >>
> >>   [opt_struct, remaining_args] = getopt (opt_string, varargin);
> >>
> >> then proceed with processing the returned options structure and the
> >> remaining arguments.
> >>
> >> jwe
> >
> > Hi John,
> > thank you for the answer. I did not expect that something like getopt is
> > not yet implemented in octave. All other languages I use (C, bash, perl,
> > R) have such a possibility. For me as a octave newcomer it is not very
> > easy to do it.
> >
> > Juergen
> >
> 
> Octave is most often used interactively, so this requirement does not
> come up often. But I suppose it shouldn't be  hard to implement by
> wrapping the GNU getopt function. It would just take someone's time.
> Maybe yours?

Ahoi Jaroslav,
is there any guide, how to write extensions to octave? I suppose, I have
to write it in C and not octave.

Juergen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]