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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b5982b7c8eb7a4fc,start X-Google-Attributes: gid103376,public From: John Raquet Subject: Simple Stream_IO question Date: 1996/10/21 Message-ID: #1/1 X-Deja-AN: 191008067 organization: The University of Calgary x-sender: jfraquet@e229b-1.ensu.ucalgary.ca content-type: TEXT/PLAIN; charset=US-ASCII mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-10-21T00:00:00+00:00 List-Id: I'm trying to use Streams.Stream_IO to read/write multiple record types from a single file. I know it's simple to do, but I can't figure out how to do it. If someone could show me what I'm doing wrong in the following code sample I'd appreciate it: ----------------- with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; procedure Foo is F : Float; I : Integer; File : File_Type; begin Open(File, In_File, "foo.adb"); Float'Read(File, F); Integer'Read(File, I); Close(File); end Foo; --------------------------------------------------------- John F. Raquet jfraquet@acs.ucalgary.ca Dept of Geomatics Engineering Phone: (403) 220-7378 University of Calgary Fax: (403) 284-1980 ---------------------------------------------------------