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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,913c345bb1f6b908 X-Google-Attributes: gid103376,public From: John English Subject: Re: Text Files Date: 2000/05/23 Message-ID: <392AB93E.DB972A80@bton.ac.uk>#1/1 X-Deja-AN: 626366746 Content-Transfer-Encoding: 7bit References: <8gdguu$f9v$1@news.cowan.edu.au> <959088712.853876@hearts.q-net.net.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@bton.ac.uk X-Trace: saturn.bton.ac.uk 959101340 12720 193.62.183.204 (23 May 2000 17:02:20 GMT) Organization: University of Brighton Mime-Version: 1.0 NNTP-Posting-Date: 23 May 2000 17:02:20 GMT Newsgroups: comp.lang.ada Date: 2000-05-23T17:02:20+00:00 List-Id: Cameron McShane wrote: > I have the program writing to a file etc, however only when using a direct > filename, ie > > Text_Io.Create( > File => In_Data, > Mode => Text_Io.Out_File, > Name => "c:\biff.txt"); > > This works beautifully. > > When I try and get user input for the name of the string, ie > > Text_io.get_line(Filename, Last); > Text_Io.Create( > File => In_Data, > Mode => Text_Io.Out_File, > Name => Filename(1..Last)); > > it doesn't work When you say "it doesn't work" what exactly do you mean? Your code looks fine (in isolation); do you get an exception of some sort when you run it? If so, which one? In particular, is Filename declared to be big enough to hold the name you type in? Have you tried displaying the values of Last and Filename(1..Last) to make sure they're what you expect? ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------