From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Renaming vs assignment to constant
Date: Sat, 7 Dec 2013 10:02:38 +0100
Date: 2013-12-07T10:02:38+01:00 [thread overview]
Message-ID: <10qm9z7ruhw6k$.1vecckf0nymyr$.dlg@40tude.net> (raw)
In-Reply-To: d805ha5jv9g5$.1x808i6us8sfz.dlg@40tude.net
On Sat, 7 Dec 2013 09:57:27 +0100, Dmitry A. Kazakov wrote:
> On Fri, 6 Dec 2013 13:59:21 -0800 (PST), Shark8 wrote:
>
>> After using some of the Ada1012 features it'd be kinda nice to put
>> pre/post conditions on a callback independent of those of the actual
>> subprogram referenced; perhaps:
>
> Renaming was always infamous for ignoring whatever constraints:
>
> type A is array (Integer range <>) of Float;
> procedure Foo (X : in out A) is
> subtype Slided is A (10..20);
> Y : Slided renames X (X'First..X'First + 9);
> begin
> X (10) := 0.0; -- Not what you would think!
^^^^^
Y (10) := 0.0;
of course.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
prev parent reply other threads:[~2013-12-07 9:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 15:14 Renaming vs assignment to constant Simon Wright
2013-12-06 16:09 ` Jeffrey Carter
2013-12-06 18:03 ` AdaMagica
2013-12-06 18:24 ` Jeffrey Carter
2013-12-06 16:47 ` adambeneschan
2013-12-06 18:06 ` Eryndlia Mavourneen
2013-12-07 0:47 ` Randy Brukardt
2013-12-07 1:55 ` Shark8
2013-12-06 18:35 ` G.B.
2013-12-06 20:07 ` adambeneschan
2013-12-06 21:59 ` Shark8
2013-12-06 23:48 ` adambeneschan
2013-12-07 1:04 ` Shark8
2013-12-07 1:26 ` adambeneschan
2013-12-07 6:17 ` J-P. Rosen
2013-12-07 6:22 ` J-P. Rosen
2013-12-07 8:57 ` Dmitry A. Kazakov
2013-12-07 9:02 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox