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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Sat, 05 Apr 2014 10:28:12 +0200 Organization: Home - http://www.obry.net Message-ID: <1396686492.4415.52.camel@pascal.home.net> References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <1396206120.12713.8.camel@pascal.home.net> <1rmd466o46wkh$.xv2pypcsl4nb.dlg@40tude.net> Reply-To: pascal@obry.net NNTP-Posting-Host: Orc9jTt42m5E8pbj+j12Ig.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Complaints-To: abuse@aioe.org X-Mailer: Evolution 3.8.5-2+b3 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:185552 Date: 2014-04-05T10:28:12+02:00 List-Id: Le dimanche 30 mars 2014 =C3=A0 21:33 +0200, Dmitry A. Kazakov a =C3=A9crit= :=20 > On Sun, 30 Mar 2014 21:02:00 +0200, Pascal Obry wrote: >=20 > > Le dimanche 30 mars 2014 =C3=A0 05:28 -0700, francois_fabien@hotmail.co= m a > > =C3=A9crit :=20 > >> One wish to ease Input/output : > >> To have some equivalent of C primitive : printf("%c %c %c %c %c \n %c = %c %c %c %c \n", > >=20 > > Well, this is possible in Ada with some coding of a package, one could > > write something like (maybe already implemented by someone, I remember = a > > simple_io package or something like that): > >=20 > > Formatted_Print=20 > > ("%c %c %c %c %c \n %c %c %c %c %c \n" > > & Var1 & Var2 & Var3 & Var4 & Var5 & Var6 & Var7 & Var8); > >=20 > > You just have to code the Formatted_Print routine once for all. No big > > deal: > >=20 > > type Formatted_String is private; > >=20 > > Format_Error : exception; > >=20 > > function "&"=20 > > (F : Formatted_String; V : Character) return Formatted_String; > > function "&"=20 > > (F : Formatted_String; V : Integer) return Formatted_String; > > function "&"=20 > > (F : Formatted_String; V : Float) return Formatted_String; > > ... > >=20 > > procedure Formatted_Print (F : Formatted_String); > >=20 > > procedure Formatted_Print=20 > > (File : Text_IO.File_Type;=20 > > F : Formatted_String); >=20 > I did such things, it is not so simple. >=20 GNAT has now support for formatted string. --=20 Pascal Obry / Magny Les Hameaux (78) The best way to travel is by means of imagination http://v2p.fr.eu.org http://www.obry.net gpg --keyserver keys.gnupg.net --recv-key F949BD3B