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,a30e2d840674d0ef,start X-Google-Attributes: gid103376,public From: gaukrogi@aston.ac.uk (Rofi) Subject: Stream IO - Correct usage of Set_Index Date: 1999/03/01 Message-ID: <7bemc8$snn$1@whatsit.aston.ac.uk>#1/1 X-Deja-AN: 450089331 Content-Type: text/plain; charset=us-ascii Organization: Aston University Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-01T00:00:00+00:00 List-Id: Platform : Solaris, Linux Compiler : GNAT 3.10p Already Looked in : Ada Reference Manual; Programming in Ada95 by John Barnes; www.dejanews.com, searching for streams in comp.lang.ada. Hi I am trying to use Stream_IO to create (and use) a file that contains different data types. Creating, writing to and reading from the file in a sequential manner is not a problem. My problem is using Set_Index to move to a particular data structure that is situated part way through the file. How do I find out the size of a data structures so that I can use Set_Index correctly. E.G. type1 and type2 are of difference sizes. Start of File Var1 of type1 Var2 of type1 Var3 of type1 Var4 of type1 Var5 of type2 Var6 of type2 <-- how would I access this variable directly ..... End of File I have tried using the attribute Size which appears to return the size of the datastructure in bits. On this compiler I can divide this by 8 and I get the correct values but this method seem to me to be very Adalike. Am I missing something monumentally obvious or ...... ? Cheers Rofi