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,4f2ff548f619cc58,start X-Google-Attributes: gid103376,public From: "Kevin Rigotti" Subject: End of File for streams Date: 2000/04/17 Message-ID: <8df15j$e4b$1@trog.dera.gov.uk>#1/1 X-Deja-AN: 612210826 Organization: Defence Evaluation & Research Agency X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 Newsgroups: comp.lang.ada Date: 2000-04-17T00:00:00+00:00 List-Id: Given an input file accessed via T'Read() on the associated stream access value, is there a clean way to determine end of file? All I have at the point of need is the stream access value not the File_Type object that it was obtained from so I can't just use Ada.Streams.Stream_IO.End_of_File or compare Index() with Size(). The file has more than one data type in it, read in different parts of the source code, so keeping track of how much I've read is not trivial. I have philosophical and aesthetic objections to trapping the End_Error exception as a means of determining end of file, but is this the only way to do it? Kevin