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.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!aioe.org!.POSTED!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Sun, 30 Mar 2014 21:02:00 +0200 Organization: Home - http://www.obry.net Message-ID: <1396206120.12713.8.camel@pascal.home.net> References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> Reply-To: pascal@obry.net NNTP-Posting-Host: L9vAWPXftET0fEf5/kGUFw.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 X-Original-Bytes: 2197 Xref: number.nntp.dca.giganews.com comp.lang.ada:185425 Date: 2014-03-30T21:02:00+02:00 List-Id: Le dimanche 30 mars 2014 =C3=A0 05:28 -0700, francois_fabien@hotmail.com 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", 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): Formatted_Print=20 ("%c %c %c %c %c \n %c %c %c %c %c \n" & Var1 & Var2 & Var3 & Var4 & Var5 & Var6 & Var7 & Var8); You just have to code the Formatted_Print routine once for all. No big deal: type Formatted_String is private; Format_Error : exception; 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; ... procedure Formatted_Print (F : Formatted_String); procedure Formatted_Print=20 (File : Text_IO.File_Type;=20 F : 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