comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: GNAT: no more exception raised on illformed text file?
Date: Mon, 06 Feb 2012 16:33:32 +0100
Date: 2012-02-06T16:33:32+01:00	[thread overview]
Message-ID: <jgorsc$ho9$1@dont-email.me> (raw)
In-Reply-To: <op.v88wsspwule2fv@douda-yannick>

Le 06/02/2012 08:08, Yannick Duchêne (Hibou57) a écrit :
> 
> Hi all,
> 
> Seems my FSF GNAT (*) does not raise an exception anymore when
> encountering the last line of a malformed text file; that is, a text
> file whose last line is not terminated with an end‑of‑line.
> 
> Is this on purpose?
I don't know, but it is definitely acceptable, and many would view this
as an improvement.

Ada says nothing about how an end_of_file_mark (and siblings) is
represented in the physical file. Considering that the end of the
physical file acts as an end_of_line_mark followed by an
end_of_page_mark followed by and end_of_file_mark is actually quite user
friendly: currently, all my programs that read files do not check the
end of file, but catch end_error, precisely because it works better on
ill formed files.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr



  reply	other threads:[~2012-02-06 15:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06  7:08 GNAT: no more exception raised on illformed text file? Yannick Duchêne (Hibou57)
2012-02-06 15:33 ` J-P. Rosen [this message]
2012-02-06 16:03   ` Yannick Duchêne (Hibou57)
2012-02-06 16:27   ` Adam Beneschan
2012-02-06 19:04 ` Shark8
2012-02-06 19:45   ` Adam Beneschan
2012-02-07  6:47   ` J-P. Rosen
replies disabled

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