comp.lang.ada
 help / color / mirror / Atom feed
* Array conversion and bounds
@ 2018-04-15  9:36 Dmitry A. Kazakov
  2018-04-15 10:37 ` Niklas Holsti
  2018-04-15 17:55 ` Robert A Duff
  0 siblings, 2 replies; 9+ messages in thread
From: Dmitry A. Kazakov @ 2018-04-15  9:36 UTC (permalink / raw)


Do array bounds slide during conversion? Consider this:

    type A is array (Integer range <>) of Whatever;
    type B is array (Unsigned_32 range <>) of Whatever;

    X : A (-10..-1);
    Y : B (1..10);
begin
    Y := B (X); -- Is this OK?

If bounds slide it must be OK, if bounds do not slide, it must raise 
Constraint_Error.

Any language lawyers?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-15 20:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-15  9:36 Array conversion and bounds Dmitry A. Kazakov
2018-04-15 10:37 ` Niklas Holsti
2018-04-15 12:34   ` Dmitry A. Kazakov
2018-04-15 13:11     ` Niklas Holsti
2018-04-15 13:24       ` Dmitry A. Kazakov
2018-04-15 18:21         ` Niklas Holsti
2018-04-15 20:29           ` Dmitry A. Kazakov
2018-04-15 17:55 ` Robert A Duff
2018-04-15 20:15   ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox