Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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
<> wrote:
> The point is, I have which I can compile to an application
> that parses its own args. Now I want to be able to #use ""
> 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