comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Position of "use"
Date: Tue, 15 Jul 2014 10:51:12 -0700 (PDT)
Date: 2014-07-15T10:51:12-07:00	[thread overview]
Message-ID: <f02e3f5c-dcfc-4d69-9caa-ee0f14723f70@googlegroups.com> (raw)
In-Reply-To: <lywqbewo87.fsf@pushface.org>

On Tuesday, July 15, 2014 10:01:12 AM UTC-7, Simon Wright wrote:

> But, in Ada83, a *pragma*'s scope extended over the whole compilation
> (all the compilation units).

I don't know that this was universally true; I don't see a general rule to that effect.  The rules vary from pragma to pragma.  STORAGE_UNIT and SYSTEM_NAME (since removed) had to appear at the beginning of a compilation and applied to every compilation unit in the compilation (this seems to anticipate the "configuration pragma" rules of Ada 95 and beyond).  ELABORATE, however, appears in a context clause (as does the "use" clause) but only applies to one compilation unit.  Most of the pragmas were only allowed inside declarations.  LIST(ON) and LIST(OFF) apply to the entire compilation, of course, but since it controls only the listing output and has no effect on semantics or generated code, it's really a special case.  Implementation-defined pragmas follow whatever rules the vendor decides they should.

I think the situation is pretty much the same in Ada 95+, except a little more formalized.  There's no one rule defining the scope of pragmas, but there are rules for categories of pragmas (in particular "configuration pragmas").

                            -- Adam

  parent reply	other threads:[~2014-07-15 17:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05  6:43 Position of "use" Victor Porton
2014-07-05  7:12 ` J-P. Rosen
2014-07-07 16:45   ` Adam Beneschan
2014-07-07 17:08     ` Pascal Obry
2014-07-07 17:40       ` Peter Chapin
2014-07-07 19:17       ` Adam Beneschan
2014-07-08  5:26     ` J-P. Rosen
2014-07-08 15:32       ` Adam Beneschan
2014-07-08 19:30 ` Adam Beneschan
2014-07-08 22:39   ` Victor Porton
2014-07-09 10:36 ` anon
2014-07-09 15:14   ` Adam Beneschan
2014-07-10  1:27     ` anon
2014-07-10  9:50       ` AdaMagica
2014-07-10 13:10         ` J-P. Rosen
2014-07-10 15:57           ` Adam Beneschan
2014-07-10 17:47             ` Tero Koskinen
2014-07-10 19:15           ` Jeffrey Carter
2014-07-15  5:56         ` anon
2014-07-15  7:36           ` Georg Bauhaus
2014-07-15 17:01             ` Simon Wright
2014-07-15 17:23               ` Jeffrey Carter
2014-07-15 19:44                 ` Simon Wright
2014-07-15 17:47               ` G.B.
2014-07-15 17:51               ` Adam Beneschan [this message]
2014-07-15 20:04                 ` Simon Wright
2014-07-16  7:19                 ` anon
2014-07-10 15:54       ` Adam Beneschan
replies disabled

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