From: Jeff Carter <jrcarter@acm.org>
Subject: Re: I18N gettext style
Date: 2000/03/05
Date: 2000-03-05T00:00:00+00:00 [thread overview]
Message-ID: <38C28514.55423F80@acm.org> (raw)
In-Reply-To: 89rg5c$aqm1@news.cis.okstate.edu
David Starner wrote:
>
> On Sat, 04 Mar 2000 08:28:01 GMT, tmoran@bix.com <tmoran@bix.com> wrote:
> >> Ada.Text_IO.Put (N("Hi! There are ") && To_String(I) && N("widgets!"));
> >>won't put I in the proper position in the translated message for some
> > Certainly an Ada version of printf in the form of a set like
> > procedure print0(s : in string);
> > procedure print1(s : in string; a : in string);
> > procedure print2(s : in string; a : in string; b : in string);
>
> Is there any reason you used print0, print1, print2, instead of
> print, print, print? My instinct is to overload them.
My instinct is to only have one, which can handle an indeterminate
number of arguments:
with Ada.Strings.Unbounded;
use Ada.Strings.Unbounded;
...
type String_Set is array (Positive range <>) of Unbounded_String;
procedure Print (Format : in String; Arguments : in String_Set);
...
Print
(Format => "There are %s arguments.", -- is this correct?
Arguments => (1 => Image (Num_Args) );
--
Jeff Carter
"Your mother was a hamster and your father smelt of elderberries."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2000-03-05 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-04 0:00 I18N gettext style David Starner
2000-03-04 0:00 ` tmoran
2000-03-04 0:00 ` David Starner
2000-03-05 0:00 ` Jeff Carter [this message]
2000-03-05 0:00 ` Ehud Lamm
2000-03-05 0:00 ` tmoran
2000-03-06 0:00 ` Nick Roberts
2000-03-06 0:00 ` David Starner
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox