From: anon@att.net
Subject: Re: Position of "use"
Date: Tue, 15 Jul 2014 05:56:06 +0000 (UTC)
Date: 2014-07-15T05:56:06+00:00 [thread overview]
Message-ID: <lq2fpk$dqu$1@speranza.aioe.org> (raw)
In-Reply-To: f8345aa5-d4e9-4919-8b32-541336a2e436@googlegroups.com
--
-- Just because one may think its wrong, does not make it so.
-- The RM does not limit scope of the "with_clause". And does not
-- fully check the simple_name for duplicates.
--
-- This makes it a RM problem not a compiler bug. The "With_Clause"
-- scope is defined in RM 10.1.2 (5), and does suggest that the
-- "With_Clause" for a multiple compilation files are global.
--
-- This example works under GNAT.
--
with Ada.Text_IO ;
-- Some will say that the compiler should give a warning for
-- duplicate entry but the RM permit the following statements
with Ada.Text_IO ;
with Ada.Text_IO ;
procedure t is
use Ada ;
use Ada.Text_IO ;
use Text_IO ;
-- Should give a warning for duplicate but the RM permit this
use Text_IO ;
begin
Ada.Text_IO.New_Page ;
Text_IO.Put ( "T" ) ;
New_Line ;
end ;
In <f8345aa5-d4e9-4919-8b32-541336a2e436@googlegroups.com>, AdaMagica <christ-usch.grein@t-online.de> writes:
>On Thursday, July 10, 2014 3:27:08 AM UTC+2, an...@att.net wrote:
>> Actually, the comments for compilation_unit 4 are correct under multiple
>> compilation_unit type files, which GNAT does not support. It was tested
>> under AdaEd-1.11.0a compiled for SuSE Linux, before I posted a condensed
>> version.
>
>That sounds quite unbelievable to me; looks like AdaEd has a severe bug - if your claim is correct.
>
>> Note: GNAT (Adacore or GNU) does not support multiple
>> compilation_unit (s) within one file.
>>
>> For multiple compilation_unit, likes those files found in ACVC, the
>> external visibility starts with the "with_clause" and that clause
>> grants all succeeding compilation_unit(s) access to that package or
>> routine no matter how many compilation_unit there are. In other words
>> you only need one "with_clause" for Ada compilers that support multiple
>> compilation_unit in the same file.
>
>Please show us such a file or at least give the reference in ACATS 3.1.
next prev parent reply other threads:[~2014-07-15 5:56 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 [this message]
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
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