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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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 Path: g2news2.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!not-for-mail From: John McCabe Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line.Argument_Count question Date: Thu, 17 Sep 2009 14:50:55 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <4ab00009$0$282$14726298@news.sunsite.dk> NNTP-Posting-Host: RXEkuaSUwmKe0XIGFYSK7A.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.0 X-Newsreader: Forte Agent 2.0/32.652 Cancel-Lock: sha1:j3i7dGjiHhHdn+oSLlJCBrjQDuU= Xref: g2news2.google.com comp.lang.ada:8367 Date: 2009-09-17T14:50:55+01:00 List-Id: On Tue, 15 Sep 2009 22:58:49 +0200, Thomas L�cke <"tl at ada-dk.org"> wrote: >The RM has this to say about Argument_Count: > >"If the external execution environment supports passing arguments to a >program, then Argument_Count returns the number of arguments passed to >the program invoking the function. Otherwise it returns 0. The meaning >of �number of arguments� is implementation defined." > >I'm wondering what that last sentence mean? Is the RM trying to tell me >that Argument_Count cannot be trusted to yield the same result on >different systems (Unix, BSD, Windows, Linux and so on)? > >Or am I missing the point? Are you also thinking of whether the program itself counts as an argument? For example if, on the command line, I type: prog1.exe a b c 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? John