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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e2b1bd6557babda6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-15 10:49:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.clear.net.nz!news.clear.net.nz.POSTED!not-for-mail NNTP-Posting-Date: Tue, 15 Jul 2003 12:49:00 -0500 From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: Terminating a task Date: Wed, 16 Jul 2003 05:49:04 +1200 Message-ID: <5ra8hvkkabsvevc2r0abu4mp71dfochelr@4ax.com> References: <1ec946d1.0307141545.2175a770@posting.google.com> X-Newsreader: Forte Agent 1.92/32.572 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Organization: Customer of Mercury Telecommunications Ltd Cache-Post-Path: drone5.qsi.net.nz!unknown@tnt1-269.quicksilver.net.nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) X-Original-NNTP-Posting-Host: drone5-svc-skyt.qsi.net.nz X-Original-Trace: 16 Jul 2003 05:48:57 +1200, drone5-svc-skyt.qsi.net.nz NNTP-Posting-Host: 203.97.37.6 X-Trace: sv3-HcD37QWisR4JxckxV23uY8ZgVO5JF0lvPDYULL2c4e2yrWpyLd2Gc7prMfrCW5rnr6XYB4lKE/PxAip!6oXj84jQdhIbV+0qFIeToDVvqsrTQfmpSW8xAVEYMuTnAaJ95p6Nd0ELeled4oT5/B5EV8FvjUvL!U/tFihc= X-Complaints-To: Complaints to abuse@clear.net.nz X-DMCA-Complaints-To: Complaints to abuse@clear.net.nz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:40300 Date: 2003-07-16T05:49:04+12:00 List-Id: On 14 Jul 2003 16:45:32 -0700, mheaney@on2.com (Matthew Heaney) wrote: >> PS. The new "Computer Language Shootout" website now has Ada. >> >> http://dada.perl.it/shootout/index.html >> >> My "wc" word count program got eliminated probably since the tester >> could not link in Win32 "_setmode" and "_read". (Ada 95 packages do not >> allow accurate reading from the standard input). I correct that: Mr A. Calpini can link (gnatmake runs easily). >Your word count program got eliminated because it is junk. I have not got a statement of the reasoning and I have requested that. I guess that the contest person would reply. ... >I have no idea what you mean about not being able to accurately read >from standard input. Ada 95 can't read data accurately from the console: (a) Text_IO has an undefined behaviour on what bounds lines. The Stream_IO package does not let the standard input be specified. GNAT extensions were not used (i.e. fread() in Interfaces.C_Streams). AARM A.12.1 The Package Streams.Stream_IO" http://www.adaic.org/standards/95aarm/html/AA-A-12-1.html >Here is a simplified version of the program, which closely follows the >gcc example: > My code is better: http://dada.perl.it/shootout/gnat_allsrc.html >with Ada.Text_IO; use Ada.Text_IO; [...] >procedure WC is ... > while not End_Of_File loop > Get_Line (Line, Last); A program called "word counter" need not receive data containing text. The 'wc' specs agree: http://www.bagley.org/~doug/shootout/bench/wordfreq/ Ada.Text_IO was not portable over to ObjectAda 7.2.2: End_Error on a missing NL at the end of the file. Using Ada.Text_IO's Read_Line is not safe in presumably all samples programs if GNAT might not be used. Correctness testing could appear later. Poplog LISP was losing entries: http://dada.perl.it/shootout/poplisp.html The New Shootout: http://dada.perl.it/shootout/ Old site has e-mail addr. Craig Carey GNAT's C++ Cpp_Virtual pragma: http://www.ijs.co.nz/code/ada_95_gnat_bindings_to_cpp_example_program.txt