From: "Martin Dowie" <martin.dowie@baesystems.com>
Subject: Re: Uninitialized variable and the effects they have
Date: Thu, 24 Nov 2005 11:49:50 -0000
Date: 2005-11-24T11:51:09+00:00 [thread overview]
Message-ID: <4385a6e7$1_1@glkas0286.greenlnk.net> (raw)
In-Reply-To: dm41j1$epv$1@sunnews.cern.ch
Maciej Sobczak wrote:
[snip]
> I : Integer; -- uninitialized
It's likely that "I" will contain a valid value - you just don't know what
it is! If it was a float it might be a different matter.
> J : Integer := I + 2;
The assignment may raise a Constraint_Error depending on what happened to be
in I at the time.
That's (yet another) reason to declare your own types and preferably ones
that are not full range with respect to their base type. Combine that with
"pragme Normalize_Scalars;" (see H.1) and you have a chance.
In general, see 13.9.1.
Cheers
-- Martin
next prev parent reply other threads:[~2005-11-24 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-24 9:36 Uninitialized variable and the effects they have Maciej Sobczak
2005-11-24 11:49 ` Martin Dowie [this message]
2005-11-24 16:33 ` Wilhelm Spickermann
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox