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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,136a2b49b817b53c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-26 07:07:01 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!ucberkeley!hammer.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed.icl.net!skynet.be!isdnet!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Binary Data File - PLEASE HELP Date: Mon, 26 Mar 2001 09:56:51 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <99nlbs$1bd$1@nh.pace.co.uk> References: <%FIv6.31761$Q4.5539631@news2-win.server.ntlworld.com> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 985618620 1389 136.170.200.133 (26 Mar 2001 14:57:00 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 26 Mar 2001 14:57:00 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:6054 Date: 2001-03-26T14:57:00+00:00 List-Id: Not really the best way to go. Look at Stream_IO as I mentioned in another post... MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "chris.danx" wrote in message news:%FIv6.31761$Q4.5539631@news2-win.server.ntlworld.com... > Try using Direct_IO instantiated for type Char, or a mod 'byte' type > > i.e. type byte is mod 256; > > then write a procedure > > -- read a sequence of bytes upto numb, from file; > -- if reaches EOF first raise exception EOF_Error; > -- > procedure fread (file : in File_Type; > bytes : out byte_array_type; > numb : in Natural); > > the procedure simply uses a while loop or a for loop to read from the file > numb times. > > -- though i'm not sure how to get an unconstrained array to work for this; > > type byte_array_type is array(natural range <>) of byte; > > would be ok, but it might not work with the above procedure. Someone else > will have to help you with that. I'd be interested to get any number of > bytes out in an unconstrained type. Anyone know how? > > Chris Campbell > >