comp.lang.ada
 help / color / mirror / Atom feed
* Is GNAT white space sensitive?
@ 2015-04-10 12:14 G.B.
  2015-04-10 12:23 ` J-P. Rosen
  0 siblings, 1 reply; 3+ messages in thread
From: G.B. @ 2015-04-10 12:14 UTC (permalink / raw)


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;

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

* Re: Is GNAT white space sensitive?
  2015-04-10 12:14 Is GNAT white space sensitive? G.B.
@ 2015-04-10 12:23 ` J-P. Rosen
  2015-04-10 14:17   ` G.B.
  0 siblings, 1 reply; 3+ messages in thread
From: J-P. Rosen @ 2015-04-10 12:23 UTC (permalink / raw)


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

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

* Re: Is GNAT white space sensitive?
  2015-04-10 12:23 ` J-P. Rosen
@ 2015-04-10 14:17   ` G.B.
  0 siblings, 0 replies; 3+ messages in thread
From: G.B. @ 2015-04-10 14:17 UTC (permalink / raw)


On 10.04.15 14:23, J-P. Rosen wrote:
> Yes. GNAT considers indentation in its error message strategy.

Thank you. One more useful idea to keep in mind.



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

end of thread, other threads:[~2015-04-10 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 12:14 Is GNAT white space sensitive? G.B.
2015-04-10 12:23 ` J-P. Rosen
2015-04-10 14:17   ` G.B.

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