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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3a6a9f1d654285ba X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z31g2000yqd.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) Date: Wed, 5 Aug 2009 15:04:17 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7a5aea9c-1ade-4d73-98ef-08d226823161@z31g2000yqd.googlegroups.com> References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> <0c18b36c-7af0-454c-8208-9b0416111a1f@w41g2000yqb.googlegroups.com> <87fxc9e0mg.fsf@nbi.dk> <4a76cd4f$0$31329$9b4e6d93@newsspool4.arcor-online.net> <87bpmxdqfo.fsf@nbi.dk> <2bae762e-0d8a-4389-843a-466e87f59fd1@a37g2000prf.googlegroups.com> <4a786b15$0$30230$9b4e6d93@newsspool1.arcor-online.net> <67e76046-62d4-4c0e-bdd8-8d00cdf93bca@l35g2000pra.googlegroups.com> <4a79f712$0$31874$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: 94.108.176.85 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1249509857 11392 127.0.0.1 (5 Aug 2009 22:04:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Aug 2009 22:04:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z31g2000yqd.googlegroups.com; posting-host=94.108.176.85; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.12 (Debian-3.0.12-1),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7614 Date: 2009-08-05T15:04:17-07:00 List-Id: Georg Bauhaus wrote on comp.lang.ada: > + =A0 =A0procedure Print (Item : String) is > + =A0 =A0 =A0 Data : char_array renames To_C (Item & ASCII.LF); > + =A0 =A0begin > + =A0 =A0 =A0 if fputs (Data'Address, stdout) < 0 then > + =A0 =A0 =A0 =A0 =A0raise Ada.IO_Exceptions.Device_Error; > + =A0 =A0 =A0 end if; > + =A0 =A0end Print; I'm curious to know how the following performs: Stdout : constant Ada.Text_IO.Text_Streams.Stream_Access :=3D Ada.Text_IO.Text_Streams.Stream (Ada.Text_IO.Standard_Output); procedure Print (Item : String) is begin String'Write (Stdout, Item); Character'Write (Stdout, ASCII.LF); end Print; -- Ludovic Brenta.