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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b56dc2cdde470ff4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-18 13:06:13 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!grolier!newsfeed.planete.net!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: Reading from a .cfg file Date: Mon, 18 Jun 2001 15:45:34 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9gllp0$gsm$1@nh.pace.co.uk> References: NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 992893536 17302 136.170.200.133 (18 Jun 2001 19:45:36 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 18 Jun 2001 19:45:36 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: archiver1.google.com comp.lang.ada:8869 Date: 2001-06-18T19:45:36+00:00 List-Id: Not being familiar with what a .cfg file is puts me at a disadvantage, but here's a starting point: From Ada95, you have Stream files which are basically files of 8-bit bytes which then you have to interpret yourself. However, this is not backwards compatible to Ada83. (Are you *sure* you want to support that?) From Ada83, you can kind of get there by using an instantiation of Sequential_IO with your own data type to represent bytes. (Upward compatible to Ada95) You then read the file one byte at a time & translate it as needed. The Ada83 answer may have problems depending on the OS and underlying file system. It was not intended for reading files as raw bytes - but you can usually get there from here. If you provide a bit more detail about what you want to read & how, we might be able to give you a better answer. 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/ "J J. Rauch" wrote in message news:bfc234ad.0106180924.3320ef28@posting.google.com... > I am brand new to Ada and i need to write a package to read and parse > data from a .cfg file. This package has to be compatible with both > Ada 83 and Ada 95 as it will be used with programs that are written > with both versions. > Any input would be very helpful because I am just starting off with > Ada now. I will be writing the package using Apex Ada 95 if that > matters. > Thank you, > J. R.