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,19bec73ca578366e,start X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Implementing a stream Date: 1998/12/15 Message-ID: <7563nn$evn$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 422526983 X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Dec 15 16:45:44 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1998-12-15T00:00:00+00:00 List-Id: I'm looking at implementing a stream class, but I don't think I quite understand the expected interface. I know I have to implement the following subprogram: procedure Read( Stream : in out Root_Stream_Type; Item : out Stream_Element_Array; Last : out Stream_Element_Offset); But how is it called by default (iaw: from default 'Read and 'Input routines)? For instance, if my read returns with Last < Item'length, does read get repeatedly called until Item'length items have been read? Would returning Last =0 result in a fast busy-loop? If so, I'd think the preferred method in this instance would be for Read to raise an exception or to block until there is more data. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own