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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4e594ad50ec74efc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-14 00:29:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!shale.ftech.net!news.ftech.net!peernews.cix.co.uk!newspeer1-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: Subject: Re: files and character arrays.. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Tue, 14 May 2002 08:28:35 +0100 NNTP-Posting-Host: 62.255.157.109 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1021361352 62.255.157.109 (Tue, 14 May 2002 08:29:12 BST) NNTP-Posting-Date: Tue, 14 May 2002 08:29:12 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:23998 Date: 2002-05-14T08:28:35+01:00 List-Id: "devine" wrote in message news:e6a474c.0205131830.1283b0d9@posting.google.com... > Hi. I was wandering if anyone had an example of a program that reads > in characters into an array from a file? I have seen many programs > that read integers but I have not found a program that reads > characters into an array. Do you want to read a whole lotof characters at a time, or one at a time? The functions get and get_line from ada.text_io are useful for this. Note that get_line works for strings, while get will work for strings or characters (and other things). Check the ada reference manual section A.10.1 or John English's online book (don't have the link for the book sorry, try www.adapower.com) for more. Reading characters from a file is really quite similar to reading integers from a file. The code might be (slightly) different, but the principles are the same. Look in JEs book, there's probably something in there! HTH, Chris