comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: Programming for the World in Ada95
Date: 2000/02/16
Date: 2000-02-16T00:00:00+00:00	[thread overview]
Message-ID: <2000Feb16.081407.1@eisner> (raw)
In-Reply-To: m3n1p13cmy.fsf@ns59.infomatch.bc.ca

In article <m3n1p13cmy.fsf@ns59.infomatch.bc.ca>, Ray Blaak <blaak@infomatch.com> 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




  parent reply	other threads:[~2000-02-16  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-14  0:00 Programming for the World in Ada95 John J Cupak Jr
2000-02-14  0:00 ` Gautier
2000-02-14  0:00 ` Ehud Lamm
2000-02-14  0:00 ` Larry Kilgallen
2000-02-16  0:00   ` Robert A Duff
2000-02-15  0:00 ` Jean-Pierre Rosen
2000-02-15  0:00   ` Marin D. Condic
2000-02-15  0:00     ` Ray Blaak
2000-02-16  0:00       ` Nick Roberts
2000-02-16  0:00       ` Pascal Obry
2000-02-16  0:00         ` Ray Blaak
2000-02-16  0:00       ` Larry Kilgallen [this message]
2000-02-16  0:00       ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox