comp.lang.ada
 help / color / mirror / Atom feed
* End_Of_Line, End_Of_File
@ 1996-11-30  0:00 Fernando Tricas
  1996-11-30  0:00 ` Robert Dewar
  1996-12-02  0:00 ` Peter Amey
  0 siblings, 2 replies; 7+ messages in thread
From: Fernando Tricas @ 1996-11-30  0:00 UTC (permalink / 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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1996-12-10  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-30  0:00 End_Of_Line, End_Of_File Fernando Tricas
1996-11-30  0:00 ` 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

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