From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ccd337934e964b6a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.226.10 with SMTP id ro10mr11406483pbc.6.1328542412762; Mon, 06 Feb 2012 07:33:32 -0800 (PST) Path: lh20ni267225pbb.0!nntp.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: GNAT: no more exception raised on illformed text file? Date: Mon, 06 Feb 2012 16:33:32 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Date: Mon, 6 Feb 2012 15:33:32 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="2pHdOENru/W0SOIejymqlA"; logging-data="18185"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19SjHqeHzDAFlTqqY737E4u" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 In-Reply-To: Cancel-Lock: sha1:GzzHKuiHEI2XQL8mWVZ91TlRb6c= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-02-06T16:33:32+01:00 List-Id: 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