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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b4c3319d9998f6b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-26 09:52:02 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array 2 String Date: Fri, 26 Mar 2004 18:04:22 +0000 Organization: Cuivre, Argent, Or Message-ID: References: Reply-To: amado.alves@netcabo.pt NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1080323448 90445 212.85.156.195 (26 Mar 2004 17:50:48 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 26 Mar 2004 17:50:48 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: User-Agent: KMail/1.4.3 In-Reply-To: X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:6561 Date: 2004-03-26T18:04:22+00:00 > Im using Ada.Streams.Stream_IO for read block of files and i can conver= t > a Stream_Element_Array to String type. > how can i do? Ada.Unchecked_Conversion is your friend. But make sure you need that, instead of basic stream I/O e.g. with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; procedure Strstr is F : File_Type; S3 : String (1 .. 3); begin Create (F); String'Write (Stream (F), "abc"); Reset (F); S3 :=3D "***"; Set_Mode (F, In_File); String'Read (Stream (F), S3); pragma Assert (S3 =3D "abc"); end;