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: 103376,782af4edeb84c4b7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: basic basic ada question Date: Thu, 19 Oct 2006 19:03:08 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1161268231.345231.242170@m73g2000cwd.googlegroups.com> <4537bc65_1@newsfeed.slurp.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1161298988 6749 192.74.137.71 (19 Oct 2006 23:03:08 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 19 Oct 2006 23:03:08 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:E0aryadaOCZkrLqV/Yz5HtRAYeM= Xref: g2news2.google.com comp.lang.ada:7056 Date: 2006-10-19T19:03:08-04:00 List-Id: James Alan Farrell writes: > 2. There does not seem to be an argument(0). It appears to be the case > you cannot reference the name used to call the program. No, you can. Take a look at the Command_Line package in the RM. > 4. All parameters are stored in arrays of 1024 characters, which is > innefficient. And it's an annoying arbitrary limitation. >... It would be possible to declare a string access type and > allocate a string on the heap for each parameter. (Mostly I've used Ada > in safety critical environments where that is considered bad form.) But > if you do this the need for the record goes away because you can then > use the 'length attribute to write out the argument. > > I don't think it is possible to have different length strings holding > the arrays without using accesses and dynamic allocations (someone > correct me if I'm wrong). That's correct, but the Unbounded_Strings package can be used to hide the dynamic allocation. Probably not appropriate for your safety critical environments, but sensible in other environments. - Bob