Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 =
  struct
    include Sys
    let argv = [| "testprogram"; "my"; "arguments"; "for"; "testing" |]
  end

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
program.

John.