On Sat, Oct 10, 2009 at 1:50 PM, John W. Eaton <address@hidden> wrote: > I would ask why you want to do this.
I agree that it's not very useful from within octave, but this would be useful for stand alone scripts (i.e. #!/usr/bin/octave).
I've tried going the getopt route before (and I actually implemented it somewhere) but in the end I decided I wanted to use long options to be more consistent other programs I was using. I work some on implementing getopts but it gets pretty hairy and I was having trouble with getting method handles to work. One idea I had was to write it as an .oct wrapper to the real functions. In the end I timed out and instead went with something like this (it's probably not very robust but it works and isn't too hairy):