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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Text_IO, was: Re: Something I don't understand Date: Wed, 19 Feb 2014 17:09:46 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <4a3e55f6-9f54-4084-9f37-96efd4b0d349@googlegroups.com> <0b358700-871b-4603-addd-65e07c7d59e5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 20 Feb 2014 00:09:49 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6bab1dce10a849dba13303bd95a0f77d"; logging-data="19342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FRPe+5DdY8lgbAYiA5gEZP49DESGjdDQ=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: Cancel-Lock: sha1:si1EbEQGN8sPhhlCOr9zpvlmVCU= X-Original-Bytes: 2748 Xref: number.nntp.dca.giganews.com comp.lang.ada:185017 Date: 2014-02-19T17:09:46-07:00 List-Id: On 02/19/2014 02:46 PM, Robert A Duff wrote: > > Put("There were \1 warnings and \2 errors.\n", > Image(Warning_Count), Image(Error_Count)); And then you end up with There were 1 warnings and 1 errors. I suppose you could have Put ("There were \1 \2 and \3 \4.\n", Image (Warning_Count), (if Warning_Count = 1 then "warning" else "warnings"), Image (Error_Count), (if Error_Count = 1 then "error" else "errors") ); but then the Template is essentially unreadable. Put ("There were \1 warning\2 and \3 error\4.\n", Image (Warning_Count), (if Warning_Count = 1 then "" else "s"), Image (Error_Count), (if Error_Count = 1 then "" else "s") ); but then you can't use "" to indicate the end of the strings to include in the output. Any way you approach it is ugly. There should be some way to deal with this that is simpler and easier than what we have. -- Jeff Carter "C's solution to this [variable-sized array parameters] has real problems, and people who are complaining about safety definitely have a point." Dennis Ritchie 25