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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f5274610845c232 X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: I18N gettext style Date: 2000/03/05 Message-ID: #1/1 X-Deja-AN: 593517761 References: <89q6pg$9ac1@news.cis.okstate.edu> <89rg5c$aqm1@news.cis.okstate.edu> <38C28514.55423F80@acm.org> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: usenet@news.huji.ac.il X-Trace: news.huji.ac.il 952285835 16336 132.64.178.45 (5 Mar 2000 19:50:35 GMT) Organization: The Hebrew University of Jerusalem Mime-Version: 1.0 NNTP-Posting-Date: 5 Mar 2000 19:50:35 GMT Newsgroups: comp.lang.ada Date: 2000-03-05T19:50:35+00:00 List-Id: 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 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 | |