From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA12465 for caml-redistribution; Mon, 28 Jun 1999 20:25:29 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA29805 for ; Sun, 27 Jun 1999 13:02:53 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id NAA27495 for ; Sun, 27 Jun 1999 13:02:51 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id NAA22537 for caml-list@inria.fr; Sun, 27 Jun 1999 13:02:46 +0200 (MET DST) From: Markus Mottl Message-Id: <199906271102.NAA22537@miss.wu-wien.ac.at> Subject: Sys.argv with interpreter and compiler To: caml-list@inria.fr (OCAML) Date: Sun, 27 Jun 1999 13:02:45 +0100 (MET DST) X-Mailer: ELM [version 2.4 PL21] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: weis Hello, I just wondered, whether it is intentional behaviour that the array of command line arguments ("Sys.argv") is treated exactly the same way under the interpreter and within executables. E.g. I want to emit an error message that includes the name of the executable or, if the interpreter is used, the name of the script. Wouldn't it be logically more consistent to pass the truncated array of arguments to the script under the interpreter so that the program always gets its name on index 0 - no matter whether it is compiled or interpreted? - With the current version it gets the name of the interpreter on this position. Best regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl