From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6e64435d2a7280f2 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Command_Line.Argument_Count question Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4ab00009$0$282$14726298@news.sunsite.dk> <2191b7e4-c09d-42fe-b446-1ca01e44c1ba@b18g2000vbl.googlegroups.com> <5i5fb5t1992bsm8qjfk02l21krs8fks6km@4ax.com> Date: Mon, 21 Sep 2009 17:17:04 +0200 Message-ID: <2zfavtu2p608.p9wwiwijsnyx.dlg@40tude.net> NNTP-Posting-Date: 21 Sep 2009 17:17:04 CEST NNTP-Posting-Host: b480ecd3.newsspool2.arcor-online.net X-Trace: DXC=5AHedOoPBH7_A0jCfgHO6>A9EHlD;3Yc24Fo<]lROoR1^YC2XCjHcb9dCc[TJoBeNkg2;YmeOh2`Af5 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8416 Date: 2009-09-21T17:17:04+02:00 List-Id: On Mon, 21 Sep 2009 16:09:21 +0100, John McCabe wrote: > On Fri, 18 Sep 2009 18:16:15 -0400, Robert A Duff > wrote: > >>>>> Does Argument_Count() return 3 or 4? I haven't looked at this >>>>> paragraph in detail, or what surrounds it, but "the number of >>>>> arguments passed to the program invoking the function" sounds a bit >>>>> vague. Is the "program invoking the function" the shell, or the >>>>> program you're running? > >>>>3. > >>>>The program you're running. > >>> For all implementations? > >>For all reasonable implementations. It is possible to create a >>conforming Ada implementation that does something weird, because >>the RM leaves all this implementation-defined. It has to, because >>we can't know about all operating systems. > > Really? Surely the language here is providing a layer of abstraction > from the operating system so it should be able to be definitive about > whether the program name should be included in the argument count or > the list of arguments in Ada.Command_Line? Yes, but it certainly not as an argument of. If this functionality has to be supported then as a set of separate functions, like: Get_Image_Name (the file containing the program image), Get_Install_Name (the name used to invoke the program), Get_Command_Line (the user input caused execution of this instance), Get_Instance_Count (number of instances running) etc. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de