comp.lang.ada
 help / color / mirror / Atom feed
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: I18N gettext style
Date: 2000/03/05
Date: 2000-03-05T19:50:35+00:00	[thread overview]
Message-ID: <Pine.A41.3.96-heb-2.07.1000305214901.122226A-100000@pluto.mscc.huji.ac.il> (raw)
In-Reply-To: 38C28514.55423F80@acm.org

This is the way I did it in one of the frameworks I wrote. 

One of the nice things Ada provides is the standard way of dealing with
unconstrained arrays...

Ehud Lamm mslamm@mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm <== My home on the web 
Check it out and subscribe to the E-List- for interesting essays and more!


On Sun, 5 Mar 2000, Jeff Carter wrote:

|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
|
|





  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
2000-03-05  0:00       ` Ehud Lamm [this message]
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