TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date:
Mon, 17 Apr 2000 14:35:54 -0600
Reply-To:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset="us-ascii"
Organization:
SEAKR Engineering Inc.
From:
Parts/Attachments:
text/plain (29 lines)
Hi,
I am trying to write a code generator for our project and the following
gets a compiler
error on both GNAT v3.12 and GreenHills v1.8.9.
...
type My_Array_Type is array( positive range <> ) of integer;
...
   A_const_array : constant My_Array_Type := ( 16#1234# );   --<<< line 407

while this does not get an error:

   A_const_array : constant My_Array_Type := ( 16#1234#,  16#1234# );

GHS output:

Error: line 407 col 4 LRM:8.6(28), Expression has no possible
interpretation as an expression of the expected type My_Array_Type,
Continuing

I assume that because both compilers rejected the same statement that they
are correct, but why can't it interpret a single element array. The LRM
8.6(28) is not the most enlightening text :).

Robin P. Reagan - Software Engineer  [log in to unmask]
SEAKR Engineering, Inc.              v-303.649.1763x10
12847 East Peakview Avenue           f-303.649.1326
Englewood, CO  80011
"Imagination is more important than knowledge" -Albert Einstein-

ATOM RSS1 RSS2