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 X-Google-Attributes: gid103376,public From: je@bton.ac.uk (John English) Subject: Re: Simple Stream_IO question Date: 1996/10/22 Message-ID: <54icjl$991@saturn.brighton.ac.uk>#1/1 X-Deja-AN: 191289914 references: organization: University of Brighton newsgroups: comp.lang.ada Date: 1996-10-22T00:00:00+00:00 List-Id: John Raquet (jfraquet@acs.ucalgary.ca) wrote: : 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; -- You also need: Strm : Stream_Access; : begin : Open(File, In_File, "foo.adb"); -- And now: Strm := Stream(File); -- create a stream based on the file : Float'Read(File, F); : Integer'Read(File, I); -- These two lines should read: Float'Read(Strm, F); Integer'Read(Strm, I); : Close(File); : end Foo; --------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | fax: (+44) 1273 642405 University of Brighton | ---------------------------------------------------------------