Re: [Vala] getopt



On Thu, 2012-10-11 at 14:18 +0200, David Boesner wrote:
Hi everyone,

I want to extract which parameters and values I have passed to my program.
I used getopt, when I solved that problem in c. Is there an vala
counterpart to getopt?

You probably want the GLib.Option* stuff.  It is a bit tricky to use
from Vala, but you can use valac as an example:

http://git.gnome.org/browse/vala/tree/compiler/valacompiler.vala

Documentation:

http://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html
http://valadoc.org/glib-2.0/GLib.OptionContext.html


-Evan




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