comp.lang.ada
 help / color / mirror / Atom feed
From: "Deepie" <deepie@no-spam.ntlworld.com>
Subject: Re: reading from a file
Date: Thu, 28 Feb 2002 17:25:15 -0000
Date: 2002-02-28T17:25:15+00:00	[thread overview]
Message-ID: <CJtf8.22395$Hg1.3179318@news6-win.server.ntlworld.com> (raw)
In-Reply-To: ELXe8.11783$bs1.241207@sccrnsc01

ok, cheers guys

:P

Deepie

"Wannabe h4x0r" <chris@dont.spam.me> wrote in message
news:ELXe8.11783$bs1.241207@sccrnsc01...
> On Mon, 25 Feb 2002 12:08:01 -0500, Deepie wrote:
>
> > Hi,
> >
> > I am currently writing a program from which i need to read in from a
> > file.
> >
> > When trying to read from the file using a command such as Skip_Line(F),
> > F being the file handle, i generate an 'invalid parameter in use' error.
> >
> > things like Get_Line(F, name, length) dont work either. am i missing
> > something here?
> >
> > TIA
> >
> > deepie
>
> You know there are simpler ways to do it. Heres how I do it...
>
> with Ada.Text_IO; use Ada.Text_IO;
>
>  TEXT : string(1..N);
>  Length : Natural;
>  File : File_type;
>
> Open(File, IN_FILE, TEXT(1..Length));
>
> MAIN: <some code in here>
> get_line(FILE, TEXT, LENGTH);
> put_line(TEXT(1..LENGTH)); -- You can split up and rearrange this stuff
> in any number of ways. --
> blah blah blah....
>
> You get the picture. Sequential IO, when not necessary, is just a hassle.
>
>
> Chris





      reply	other threads:[~2002-02-28 17:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25 17:08 reading from a file Deepie
2002-02-25 17:23 ` John McCabe
2002-02-25 20:30   ` Deepie
2002-02-25 20:46     ` sk
2002-02-26  9:20       ` John McCabe
2002-02-27  2:45 ` Wannabe h4x0r
2002-02-28 17:25   ` Deepie [this message]
replies disabled

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