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-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) Date: Thu, 06 Aug 2009 15:42:10 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: 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> <7a5aea9c-1ade-4d73-98ef-08d226823161@z31g2000yqd.googlegroups.com> <4a7a0826$0$31862$9b4e6d93@newsspool3.arcor-online.net> <4a7a96a2$0$31867$9b4e6d93@newsspool3.arcor-online.net> <4a7b4daa$0$31333$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: d4ff838dfa2afeedac309278754d5bcd Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 301988c4be066e0310f581a5b67d6e93 X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <4a7b4daa$0$31333$9b4e6d93@newsspool4.arcor-online.net> X-Validate-Post: http://news.tornevall.net/validate.php?trace=301988c4be066e0310f581a5b67d6e93 X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news2.google.com comp.lang.ada:7643 Date: 2009-08-06T15:42:10-07:00 List-Id: Georg Bauhaus wrote: > > http://home.arcor.de/bauhaus/Ada/fasta.ada > procedure Print (Item : String) is > subtype Index is Stream_Element_Offset range > Stream_Element_Offset(Item'First) .. Stream_Element_Offset(Item'Last); > subtype XString is String (Item'Range); > subtype XBytes is Stream_Element_Array (Index); > function To_Bytes is new Unchecked_Conversion > (Source => XString, > Target => XBytes); > LF : constant Stream_Element_Array := (1 => To_Byte (ASCII.LF)); > begin > Stream_IO.Write (stdout, To_Bytes (Item)); > Stream_IO.Write (stdout, LF); > end Print; How about subtype Index is Stream_Element_Offset range Stream_Element_Offset(Item'First) .. Stream_Element_Offset(Item'Last + 1); subtype XString is String (Item'First .. Item'Last + 1); followed by Stream_IO.Write (stdout, To_Bytes (Item & ASCII.LF) ); ? -- Jeff Carter "Blessed are they who convert their neighbors' oxen, for they shall inhibit their girth." Monty Python's Life of Brian 83