comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Binary Data File - PLEASE HELP
Date: Mon, 26 Mar 2001 09:56:51 -0500
Date: 2001-03-26T14:57:00+00:00	[thread overview]
Message-ID: <99nlbs$1bd$1@nh.pace.co.uk> (raw)
In-Reply-To: %FIv6.31761$Q4.5539631@news2-win.server.ntlworld.com

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" <chris.danx@ntlworld.com> 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
>
>





  reply	other threads:[~2001-03-26 14:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <n5su6.24687$CL6.767652@telenews.teleline.es>
2001-03-26 14:08 ` Binary Data File - PLEASE HELP Sergio
2001-03-26 14:49   ` chris.danx
2001-03-26 14:56     ` Marin David Condic [this message]
2001-03-26 14:55   ` Marin David Condic
2001-03-26 19:51     ` Ted Dennison
2001-03-26 20:55       ` Marin David Condic
2001-03-26 21:16       ` tmoran
2001-03-26 22:16         ` Marin David Condic
2001-03-26 22:41         ` Ted Dennison
2001-03-26 14:56   ` Ted Dennison
2001-03-26 15:09     ` Marin David Condic
2001-03-26 15:21   ` Martin Dowie
2001-04-05  5:08   ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox