From: Arnaud de Muyser <ademuyser@attol-testware.com>
Subject: Redefining Integer Type ...
Date: 2000/10/18
Date: 2000-10-18T12:13:36+00:00 [thread overview]
Message-ID: <39ED8FE6.3F7CF3B9@attol-testware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hi,
I've a little question about operator "+" resolution into
the following pack2-proc.adb procedure.
Why the resolved type (by gnat) is standard.integer whereas
the visible type named Integer is pack.integer (using use clause).
The type cast Integer(var) isn't enough ?
I given you the complete source to investigate what appened.
Thanks for the help.
Arnaud de Muyser
[-- Attachment #2: pack.ads --]
[-- Type: text/plain, Size: 87 bytes --]
Package Pack is
Type Integer is range 1..1000 ;
current : Integer := 1 ;
End ;
[-- Attachment #3: pack2-proc.adb --]
[-- Type: text/plain, Size: 137 bytes --]
separate( pack2 )
Procedure Proc is
Begin
for i in 1..10
loop
tab( i + 30*Integer( current) ) := 1;
end loop;
End ;
[-- Attachment #4: pack2.adb --]
[-- Type: text/plain, Size: 131 bytes --]
with Pack; use Pack;
Package Body Pack2 is
tab : array( 1..Integer(1000) ) of Integer ;
Procedure proc is separate ;
End ;
[-- Attachment #5: pack2.ads --]
[-- Type: text/plain, Size: 46 bytes --]
Package Pack2 is
Procedure Proc;
End ;
next reply other threads:[~2000-10-18 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-18 0:00 Arnaud de Muyser [this message]
2000-10-18 0:00 ` Redefining Integer Type Robert A Duff
2000-10-18 0:00 ` Pat Rogers
2000-10-18 0:00 ` Robert A Duff
2000-10-18 0:00 ` Gautier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox