English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Use Arg module to read keyword followed by unspecified number of arguments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-05-23 (17:55)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] Use Arg module to read keyword followed by unspecified number of arguments
On Tue, May 23, 2006 at 12:17:18PM -0500, mulhern wrote:
> Hi!
> 
> I expect to be reading something like this:
> 
> -pred-files <arg1> <arg2> ... <argn> -key2 <arg> -extra-files <arg1>
> <arg2> ... <argn> -key4
> 
> There may be 0 or more <args> specified after -pred-files and after
> -extra-files. I need to treat the args differently depending on what
> keyword they are associated with.

You could maybe change what args you want to have.
If one arglist with arbitrary number of args would be sufficient,
you could do it with anonymous args, as I stated in my last mail.

If this does not work, you maybe should parse Sys.argv by your own.

Ciao,
   Oliver