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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,da8a419b0e3fda81 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-21 14:18:14 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!usenet.eel.ufl.edu!gmi!msuinfo!harbinger.cc.monash.edu.au!aggedor.rmit.EDU.AU!goanna.cs.rmit.oz.au!dalesmac.cs.rmit.edu.au!dale From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: Portable way to read/write from a binary file? Date: 20 Sep 1994 22:51:52 GMT Organization: RMIT, Melbourne, Australia Distribution: world Message-ID: <35np28$4i2@goanna.cs.rmit.oz.au> References: <355kao$38d@goanna.cs.rmit.oz.au> <122484@cup.portal.com> <122506@cup.portal.com> <35iuqj$5dj@goanna.cs.rmit.oz.au> NNTP-Posting-Host: dalesmac.cs.rmit.edu.au X-UserAgent: Version 1.1.3 X-XXMessage-ID: X-XXDate: Wed, 21 Sep 94 16:52:12 GMT Date: 1994-09-20T22:51:52+00:00 List-Id: I wrote: >In article , kst@alsys.com writes: >>For Ada 94 (assuming X=4 8-)}), I think Stream_IO does what you want. >> > >Unfortunately not (as I read it!) >Each object in a stream has a tag appended to it so that the >procedure S'Class'Read can reconstruct the value from the tag >contained within the stream (13.13.2.14). Keith Thompson emailed a correction to this; what I said is true only for tagged types. I had previously skimmed over streams in the LRM and produced a particularly premature perception of how it performs. When Keith posted his original reply I opened up the LRM to the section I quoted - the only bit which did agree with how I thought it worked! (Damn! !:-( ). So here's a question that I couldn't find the answer to (no more posturing about how it does work from me! :-). Does a stream of heterogenous scalar elements have any encoding so that you can decide what the byte stream represents, or does the format of the data in a stream have to be previously determined? Dale ------------------------------------------------------------- Dale Stanbrough, RMIT, Melbourne, Australia, dale@rmit.edu.au GNU Ada 94 (GNAT) => the best $0 you'll ever spend. Available for DOS, Linux, OS/2, Sun Sparc, Sun Solaris, ... Coming to a GNU supported platform near you soon...