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 X-Google-Attributes: gid103376,public From: gaukrogi@aston.ac.uk (Rofi) Subject: Re: Stream IO - Correct usage of Set_Index Date: 1999/03/04 Message-ID: <7bmj4n$mmv$1@whatsit.aston.ac.uk>#1/1 X-Deja-AN: 451242360 References: <7bemc8$snn$1@whatsit.aston.ac.uk> <7bgej7$erj$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Aston University Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-04T00:00:00+00:00 List-Id: In article <7bgej7$erj$1@nnrp1.dejanews.com>, bourguet@my-dejanews.com writes: > In article <7bemc8$snn$1@whatsit.aston.ac.uk>, > gaukrogi@aston.ac.uk (Rofi) wrote: >> >> Already Looked in : >> Ada Reference Manual; > > The answer is there :-) With the correct directing in hindsight of course it is (d'oh). > >> 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 ...... ? > > A stream is a stream of Stream_Element, so the size you want to divide by > is Stream_Element'Size. > Yep, works like a dream. > But I'd usually design my program to have only to move to result of the > "give me the current position" function (I've not my RM here, so I can't > check). Yes, after considering the other reply to my question I think that would be best. > > -- Jean-Marc > Thanks alot, you saved a lot of hair pulling etc :-). ( Sorry for my late reply but I wanted to try out your answer (and then of course got side- tracked by something else !) ) Cheers Rofi