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:
Tue, 8 Jul 2003 11:05:54 +0200
Reply-To:
Jean-Pierre Rosen <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset="iso-8859-1"
Organization:
Adalog
From:
Jean-Pierre Rosen <[log in to unmask]>
Parts/Attachments:
text/plain (14 lines)
>11..10 and 1..0 are both null slices (i.e. statically known to be empty).
Your code therefore assigns a null slice >to a null slice and no
out-of-bounds array accesses occur so no error occurs.
>
>I would hope that a(10..11) := b(0..1); would raise a rich crop of
constraint errors.

No. A null slice never raises Constraint_Error (4.1.2(7)).
Is it a good thing? I can see pros and cons for both...
Anyway, that's the way it is.
---------------------------------------------------------
           J-P. Rosen ([log in to unmask])
Visit Adalog's web site at http://www.adalog.fr

ATOM RSS1 RSS2