From: "Cameron McShane" <cazza@aceonline.com.au>
Subject: Re: Text Files
Date: 2000/05/25
Date: 2000-05-25T13:08:26+00:00 [thread overview]
Message-ID: <959260098.454638@hearts.q-net.net.au> (raw)
In-Reply-To: 392AF852.93E0EDBE@quadruscorp.com
Hey all
Thanks everyone for your comments and help
It seems that I needed a skip_line before the get_line.
ie
Text_io.skip_line;
Text_io.get_line(Filename, Last);
Text_Io.Create(
File => In_Data,
Mode => Text_Io.Out_File,
Name => Filename(1..Last));
I was sure I had tried this already, but obviously I was mistaken.
Thanks again
Cameron
Marin D. Condic <mcondic-nospam@quadruscorp.com> wrote in message
news:392AF852.93E0EDBE@quadruscorp.com...
> Cameron McShane wrote:
> > 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
> >
> This looks like it ought to work presuming you have declared everything
> properly. What compiler/version/OS are you using?
>
> What you should try is echoing out the Filename string so you can see if
> you are, in fact, reading everything you think you are reading. For
> example, if the string variable is too short, you may not be getting the
> full name. There is a chance that you may be getting extraneous
> characters - perhaps left over from some previous input line that you
> did not fully read. In any case, make sure that you are reading what you
> *think* you are reading and that may help you solve the problem. If not,
> strip down the program to *just* the declarations and code needed to
> read the string & create the file. If this small sample doesn't work,
> then post the code.
>
> MDC
> --
> ======================================================================
> Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
> Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
> Visit my web site at: http://www.mcondic.com/
>
> "I'd trade it all for just a little more"
> -- Charles Montgomery Burns, [4F10]
> ======================================================================
>
next prev parent reply other threads:[~2000-05-25 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 ` Ted Dennison
2000-05-23 0:00 ` Marin D. Condic
2000-05-23 0:00 ` Robert Dewar
2000-05-24 0:00 ` Marin D. Condic
2000-05-23 0:00 ` David Freshwater
2000-05-23 0:00 ` Cameron McShane
2000-05-23 0:00 ` John English
2000-05-23 0:00 ` tmoran
2000-05-23 0:00 ` Ted Dennison
2000-05-23 0:00 ` Marin D. Condic
2000-05-25 0:00 ` Cameron McShane [this message]
2000-05-25 0:00 ` Jean-Pierre Rosen
2000-05-26 0:00 ` Dale Stanbrough
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox