From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA20096; Fri, 19 Apr 2002 15:33:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA20093 for ; Fri, 19 Apr 2002 15:33:06 +0200 (MET DST) Received: from t2.fast.net.uk (ns1.fast.net.uk [212.42.162.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3JDX5L14812 for ; Fri, 19 Apr 2002 15:33:05 +0200 (MET DST) Received: from htec.demon.co.uk (adsl-212-42-169-63.fast.net.uk [212.42.169.63]) by t2.fast.net.uk (8.11.6/8.11.4) with ESMTP id g3JDX1h76937 for ; Fri, 19 Apr 2002 14:33:01 +0100 (BST) Message-ID: <3CC01C92.6010606@htec.demon.co.uk> Date: Fri, 19 Apr 2002 14:33:06 +0100 From: Christopher Quinn User-Agent: Mozilla/5.0 (compatible; MSIE5.5; Windows 98; X-Accept-Language: en-us, en MIME-Version: 1.0 CC: caml-list@inria.fr Subject: Re: [Caml-list] command arguments sticking together References: <"fromAndrej.Bauer"@andrej.com> <20020419055857.E12446@deathonastick.org> <20020419182233V.garrigue@kurims.kyoto-u.ac.jp> <20020419122151.GA31540@bik-gmbh.de> <3CC01529.2090900@htec.demon.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk What I meant is actually: #!/bin/sh # (* exec myscript a b c .... *) caml code... Christopher Quinn wrote: > Here's a trick I found amongst Gerd Stolpmann's goodies. > > ------------------------- > ! /bin/sh > # (* > exec ocaml "$0" "$@" > *) > directory ".";; (* or some other directive *) > > Array.iteri > (fun i arg -> > print_endline ("[" ^ string_of_int i ^ > "] " ^ arg) > ) > Sys.argv > ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners