comp.lang.ada
 help / color / mirror / Atom feed
From: Fernando Tricas <ftricas@tsc1.cps.unizar.es>
Subject: End_Of_Line, End_Of_File
Date: 1996/11/30
Date: 1996-11-30T00:00:00+00:00	[thread overview]
Message-ID: <Pine.SUN.3.95.961130130247.261C-100000@tsc1> (raw)


I'm trying to do a program similar to wc from Unix systems in Ada95 and
I've found the following problem when dealing with a file such as:

** begin file
a

** end file

that is a file composed of two lines, the second (and last) one one empty.

The problem is I do not know how to recognize when there is an End_Of_Line
followed by an End_Of_File or when there is and End_Of_File alone. The
problem seems to be that in Ada95 (I'm using gnat-3.01 compiler on a Unix
workstation) when End_Of_File returns true, End_Of_Line also returns true
and that need not be true. For example:

** begin file
** end file

That is, an empty text file.

Thank you and best regards,

--
Fernando Tricas
ftricas@posta.unizar.es





             reply	other threads:[~1996-11-30  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-30  0:00 Fernando Tricas [this message]
1996-11-30  0:00 ` End_Of_Line, End_Of_File Robert Dewar
1996-12-02  0:00   ` Fernando Tricas
1996-12-02  0:00     ` Robert Dewar
1996-12-10  0:00   ` Robert I. Eachus
1996-12-02  0:00 ` Peter Amey
1996-12-02  0:00   ` Robert Dewar
replies disabled

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