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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Thu, 30 Jul 2015 12:27:53 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <2df4698f-4c8e-457c-822d-209cb2f8ab5e@googlegroups.com> <014427b1-ff7a-4a69-82e6-0330af77ed96@googlegroups.com> <1438244829.17005.26.camel@obry.net> <0a8104af-4ebb-4d82-92e5-6ba7289272ce@googlegroups.com> <262cbf86-25a0-4802-b72e-ec6e650e1dc7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 30 Jul 2015 19:26:21 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="ee44d3db9c41f5ad88d7e8e8f0268f05"; logging-data="7246"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HfZDN7S4dXGDTuGRkhcyHbUHslCNOMtQ=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <262cbf86-25a0-4802-b72e-ec6e650e1dc7@googlegroups.com> Cancel-Lock: sha1:/QXinlPiK3oFcrx6mG5jc/+GhAQ= Xref: news.eternal-september.org comp.lang.ada:27238 Date: 2015-07-30T12:27:53-07:00 List-Id: On 07/30/2015 11:51 AM, EGarrulo wrote: > > OK. Now please write the code so that it could be easily adapted to a > different language by possibly swapping the arguments that are fed to the > output string (this may not cover all existing languages, but it could be good > enough). I would reimplement Printf to accept a format with positional > arguments, like "Mr %1 you have won %2 dollars!\n". Then I would define a new > format string for the alternative output and I would be done. This was > possible because a solution based on a formatting procedure recognizes that > output should easily adaptable, something that hard-coded concatenations of > strings are not. Why should I? That's not the problem you presented and I responded to. First a strawman and now a non-sequitur. Clearly you have no argument. -- Jeff Carter "Pray that there's intelligent life somewhere up in space, 'cause there's bugger all down here on earth." Monty Python's Meaning of Life 61