comp.lang.ada
 help / color / mirror / Atom feed
From: John English <je@bton.ac.uk>
Subject: Re: Text Files
Date: 2000/05/23
Date: 2000-05-23T17:02:20+00:00	[thread overview]
Message-ID: <392AB93E.DB972A80@bton.ac.uk> (raw)
In-Reply-To: 959088712.853876@hearts.q-net.net.au

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
-----------------------------------------------------------------




  parent reply	other threads:[~2000-05-23  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-23  0:00 Text Files Karlene
2000-05-23  0:00 ` Robert Dewar
2000-05-24  0:00   ` Marin D. Condic
2000-05-23  0:00 ` Marin D. Condic
2000-05-23  0:00 ` Cameron McShane
2000-05-23  0:00   ` tmoran
2000-05-23  0:00   ` Ted Dennison
2000-05-23  0:00   ` John English [this message]
2000-05-23  0:00   ` Marin D. Condic
2000-05-25  0:00     ` Cameron McShane
2000-05-25  0:00       ` Jean-Pierre Rosen
2000-05-26  0:00       ` Dale Stanbrough
2000-05-23  0:00 ` Ted Dennison
2000-05-23  0:00 ` David Freshwater
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox