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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79db4ff72bff9422 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-29 05:35:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!lsanca1-snf1!news.gtei.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3BDD4CDE.848BE3B0@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to convert record? References: <80d2e34.0110210156.7918cd3d@posting.google.com> <3bd402f9.8783319@news.demon.co.uk> <80d2e34.0110250340.155ae0b7@posting.google.com> <80d2e34.0110281742.1bf0bfa7@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 29 Oct 2001 13:35:35 GMT NNTP-Posting-Host: 63.178.180.25 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1004362535 63.178.180.25 (Mon, 29 Oct 2001 05:35:35 PST) NNTP-Posting-Date: Mon, 29 Oct 2001 05:35:35 PST X-Received-Date: Mon, 29 Oct 2001 05:31:44 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:15342 Date: 2001-10-29T13:35:35+00:00 List-Id: Joseph Kwan wrote: > > So, it must be a constrained type/subtype. This solve my problems. > Thanks. > > OTOH, I read about 13.13.2 Stream-Oriented Attributes in LRM. Can I > use 'Read and 'Write or 'Input and 'Output for [this] purpose? > > Can someone please explain in details (an example of the > implementation will be of great help) how to implement these > attributes? Please forgive my stupidity because I can't find a good > examples of such implementation in books and LRM and certainly am > unable to figure it out. > > Thank you. You can take a look at my article in Ada Letters--A Socket-Based Manifestation of Streams (www.acm.org/sigs/sigada/ada_letters/issues/june2001/socket_streams.pdf) for a discussion and full working example of how to use the stream attributes with sockets. Replace the socket functionality with the necessary buffering and I/O. Part of the motivation for the article was to demonstrate how to extend streams for storage and communication mechanisms other than files, just as you're asking about. Marc A. Criley Senior Staff Engineer Quadrus Corporation www.quadruscorp.com