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,2f5274610845c232 X-Google-Attributes: gid103376,public From: Jeff Carter Subject: Re: I18N gettext style Date: 2000/03/05 Message-ID: <38C28514.55423F80@acm.org>#1/1 X-Deja-AN: 593465846 Content-Transfer-Encoding: 7bit References: <89q6pg$9ac1@news.cis.okstate.edu> <89rg5c$aqm1@news.cis.okstate.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 952275869 63.10.52.218 (Sun, 05 Mar 2000 09:04:29 PST) Organization: EarthLink Inc. -- http://www.EarthLink.net MIME-Version: 1.0 Reply-To: jrcarter@acm.org NNTP-Posting-Date: Sun, 05 Mar 2000 09:04:29 PST Newsgroups: comp.lang.ada Date: 2000-03-05T00:00:00+00:00 List-Id: 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