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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec7fc30600a974ce X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Programming for the World in Ada95 Date: 2000/02/16 Message-ID: <2000Feb16.081407.1@eisner>#1/1 X-Deja-AN: 586511639 References: <38A83838.44A43A7D@res.raytheon.com> <88b4oa$ljt$1@wanadoo.fr> <38A99E37.F355452C@quadruscorp.com> X-Trace: news.decus.org 950706851 13369 KILGALLEN [216.44.122.34] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 2000-02-16T00:00:00+00:00 List-Id: In article , Ray Blaak writes: > A common mistake in many systems is to follow C's printf conventions, so that > the string in the data file looks like: "there are %d bad things here". The > problem comes when you have multiple parameters: > > "there are %d bad things here, %d of which matter" > > A sensible translation might need to reorder the parameters, i.e. maybe the > translated sentence needs to be in this order: > > "%d critical things are in the %d bad things here" > > But now the software won't match, since it is using positional notation. > > The fix is, of course, named placement holders: > > "there are ${total_count} bad things here, ${critical_count} of which matter" That is one solution, but not "of course" the only solution. VMS provides (and has for 20 years) provided control sequences within the string for the translator to adjust the order in which the passed parameters are consumed. !+ and !- come to mind, although I could be remembering them wrong (knowing only one natural language, I find that nobody calls on me for translation services :-). Certainly other operating systems have taken other approaches, and I would be quite surprised if OS400, for instance, did not have some other way to accomplish the same goal. If you are planning on selling into a production environment, it is the system manager who must deal with choosing which users get which languages, and doing it in the standard OS way is important to gain acceptance. It is not good if Ada programs get a reputation for being hard (i.e., different) to install and configure. Even in the PC world large corporations have central system managers who don't care at all about the algorithms in your FlumBot 2000 program, only whether it installs and configures in the standard Microsoft fashion. Larry Kilgallen