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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3c99788a4ac63037 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Pageless Text_IO Date: 1999/11/17 Message-ID: <80vdq2$kld$1@nnrp1.deja.com>#1/1 X-Deja-AN: 549868156 References: <80qarp$9qe1@news.cis.okstate.edu> <80qo6j$922$1@nnrp1.deja.com> <80s63a$afp$1@nnrp1.deja.com> <3831d7ed@excalibur.GBM> X-Http-Proxy: 1.0 x24.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Nov 17 23:30:10 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-17T00:00:00+00:00 List-Id: In article <3831d7ed@excalibur.GBM>, "John Herro" wrote: > I've done it, but it's slow and > crude, and it works only on some systems. (E.g., it works > with DOS, but not with VAX/VMS.) > You can instantiate Sequential_IO for Character, and write > your own version of Get_Line. This is not just OS dependent, but compiler dependent, there is no guarantee that sequential_IO on character will work this way. For example in Ada 83, it would be quite legitimate for it to raise an error for a character greater than 127, and in either Ada 83 or Ada 95, it would be legitimate to have control information at the start of the file, or even for every record. > This enables you to handle special > characters, like Form Feeds, the same way you handle other characters. Of > course, it's up to you if you want to keep line and page counts. In practice you can also do this special kind of programming with Text_IO if you are careful. However, the proper way to roll your own is with stream IO in Ada 95, not sequential IO, and this has the advantage that it intermixes with Text_IO very smoothly. > - John Herro > You can download a shareware AdaTutor program at > http://members.aol.com/AdaTutor > > Sent via Deja.com http://www.deja.com/ Before you buy.