comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Is GNAT white space sensitive?
Date: Fri, 10 Apr 2015 14:23:48 +0200
Date: 2015-04-10T14:23:48+02:00	[thread overview]
Message-ID: <mg8fav$tn1$1@dont-email.me> (raw)
In-Reply-To: <mg8epi$s2k$1@dont-email.me>

Le 10/04/2015 14:14, G.B. a écrit :
> If the indentation of "begin" below is removed, GNAT's error
> messages change. Do you see this, too? Can this be an effect
> of some error correction heuristics, maybe?
> 
> 
> procedure Start (Size: Positive) is
>    procedure Initialize (M : in out Matrix);
>    begin
>    null;
> end Start;
Yes. GNAT considers indentation in its error message strategy.

I guess that as spelled above, it will attache "begin" to initialize
(considering that ";" should be "is"), while if not indented, it will
attache "begin" to Start and complain that Initialize is a spec without
a body.

-- 
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:[~2015-04-10 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 12:14 Is GNAT white space sensitive? G.B.
2015-04-10 12:23 ` J-P. Rosen [this message]
2015-04-10 14:17   ` G.B.
replies disabled

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