From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1c4a54744b1a13e2,start X-Google-Attributes: gid103376,public From: Arnaud de Muyser Subject: Redefining Integer Type ... Date: 2000/10/18 Message-ID: <39ED8FE6.3F7CF3B9@attol-testware.com>#1/1 X-Deja-AN: 682831298 X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------61B35F6A236DBE53C81EA21E" X-Complaints-To: abuse@fr.uu.net X-Trace: reader1.fr.uu.net 971871216 168 213.11.81.249 (18 Oct 2000 12:13:36 GMT) Organization: UUNET Mime-Version: 1.0 NNTP-Posting-Date: 18 Oct 2000 12:13:36 GMT Newsgroups: comp.lang.ada Date: 2000-10-18T12:13:36+00:00 List-Id: This is a multi-part message in MIME format. --------------61B35F6A236DBE53C81EA21E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 --------------61B35F6A236DBE53C81EA21E Content-Type: text/plain; charset=us-ascii; name="pack.ads" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pack.ads" Package Pack is Type Integer is range 1..1000 ; current : Integer := 1 ; End ; --------------61B35F6A236DBE53C81EA21E Content-Type: text/plain; charset=us-ascii; name="pack2-proc.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pack2-proc.adb" separate( pack2 ) Procedure Proc is Begin for i in 1..10 loop tab( i + 30*Integer( current) ) := 1; end loop; End ; --------------61B35F6A236DBE53C81EA21E Content-Type: text/plain; charset=us-ascii; name="pack2.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pack2.adb" with Pack; use Pack; Package Body Pack2 is tab : array( 1..Integer(1000) ) of Integer ; Procedure proc is separate ; End ; --------------61B35F6A236DBE53C81EA21E Content-Type: text/plain; charset=us-ascii; name="pack2.ads" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pack2.ads" Package Pack2 is Procedure Proc; End ; --------------61B35F6A236DBE53C81EA21E--