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-Thread: 103376,7cef40bf61b29e8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!novia!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Binary opperations under Ada? Date: Fri, 20 Aug 2010 17:17:29 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <65WdnYGzoPP4k_LRnZ2dnUVZ_ridnZ2d@giganews.com> NNTP-Posting-Host: 75.211.175.155 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1282349852 19320 75.211.175.155 (21 Aug 2010 00:17:32 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Sat, 21 Aug 2010 00:17:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 In-Reply-To: <65WdnYGzoPP4k_LRnZ2dnUVZ_ridnZ2d@giganews.com> Xref: g2news1.google.com comp.lang.ada:13555 Date: 2010-08-20T17:17:29-07:00 List-Id: On 08/20/2010 04:23 PM, Trogdor wrote: > > -) I want to read in a raw binary file and perform bit manipulation > on the data. > > -) I vaguely remember seeing a post about a module package for low > level stuff, cut han no longer find it in the group. For I/O, you may be thinking of seqeuntial or direct I/O, or streams. You can find the packages Ada.Sequential_IO, Ada.Direct_IO, and Ada.Streams.Stream_IO in the ARM, Annex A, which is quite readable: http://www.adaic.org/standards/05rm/html/RM-TOC.html For bit manipulation, you can use (packed) arrays of Boolean or modular types. The former existed in Ada 83 and the latter were introduced in Ada 95; both should be covered in any good text. But it's better to talk about what you want to do than how you think you should do it. Sometimes you might find a better way to do something. "I would never want to belong to any club that would have someone like me for a member." Annie Hall 41 --- news://freenews.netfront.net/ - complaints: news@netfront.net ---