From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Storage_Error with parameterized records
Date: 1998/07/08
Date: 1998-07-08T00:00:00+00:00 [thread overview]
Message-ID: <wcciul96pgw.fsf@world.std.com> (raw)
In-Reply-To: 6nntf2$u2m$1@nnrp1.dejanews.com
david.c.hoos.sr@ada95.com writes:
> In article <359D3A0C.13AF4C53@cl.cam.ac.uk>,
> Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> wrote:
> > type Correlation_Matrix(Last_Line : Natural := 0) is
> > record
> > Mat : CMatrix(0 .. Last_Line, 0 .. Last_Line);
> > end record;
> >
> > causes the following warnings (and at runtime the promised
> > Storage_Error):
> >
> > warning: Storage_Error will be raised at run-time
> > warning: creation of object of this type may raise Storage_Error
Perhaps a different wording of the message would make it clearer. The
thing is, if you say "X: Correlation_Matrix(Last_Line => 1_000);" it
will probably *not* raise Storage_Error. The point is that (1) if you
don't constrain it, it will raise S_E, and (2) there's no point in
giving a default value unless you want to have some unconstrained
objects. If you leave out ":= 0", I would think the warning would go
away. But of course you could still get S_E for "Last_Line =>
1_000_000_000" on an object decl.
- Bob
--
Change robert to bob to get my real email address. Sorry.
next prev parent reply other threads:[~1998-07-08 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-03 0:00 Storage_Error with parameterized records Markus Kuhn
1998-07-04 0:00 ` Pascal MALAISE
1998-07-05 0:00 ` david.c.hoos.sr
1998-07-08 0:00 ` Robert A Duff [this message]
1998-07-08 0:00 ` Robert Dewar
[not found] ` <dewar.899586342@merv>
[not found] ` <359F50D9.5126DEE1@cl.cam.ac.uk>
1998-07-07 0:00 ` Robert Dewar
1998-07-10 0:00 ` Samuel Mize
1998-07-13 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox