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
Arg parsing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-11-04 (15:28)
From: John Prevost <j.prevost@g...>
Subject: Re: [Caml-list] Arg parsing
On Thu, 4 Nov 2004 15:42:47 +0100 (CET), Thomas Fischbacher
<thomas.fischbacher@physik.uni-muenchen.de> wrote:
> The point is, I have something.ml which I can compile to an application
> that parses its own args. Now I want to be able to #use "something.ml"
> from within ocaml in such a way that it operates on the extra application
> args I passed to the ocaml interpreter without having to change any code.

Perhaps if you explained why you want to do this, it would be easier
for us to help you.  For example, if you're using #use to test out
argument parsing code, perhaps this could help you:

module Sys =
    include Sys
    let argv = [| "testprogram"; "my"; "arguments"; "for"; "testing" |]

Other than that, I'm having a *really* hard time figuring out why you
would want to examine your command line arguments from an interactive