comp.lang.ada
 help / color / mirror / Atom feed
* Prefix to 'ACCESS must either statically match... But why?
@ 2003-01-25 22:31 Wojtek Narczynski
  2003-01-26  9:57 ` Martin Krischik
  2003-01-27 19:30 ` Vadim Godunko
  0 siblings, 2 replies; 4+ messages in thread
From: Wojtek Narczynski @ 2003-01-25 22:31 UTC (permalink / raw)


Hello,

Could somebody please explain me why is this rule present? I find it
very limting. Is this because AR2 bounds are not stored with the
object?

Type Stream_Element_Array_access is access all Stream_Element_Array;

AR1 : aliased Stream_Element_Array := ( 2, 4, 5 );
AR2 : aliased Stream_Element_Array ( 1 .. 3 ) := ( 2, 4, 5 );

AR1A : Stream_Element_Array_access := AR1'access;

-- Illegal
AR2A : Stream_Element_Array_access := AR2'access;


LRM:3.10.2(27), The nominal subtype of the prefix to 'ACCESS or
'UNCHECKED_ACCESS must either statically match the designated subtype
of the expected type or the designated subtype must be discriminated
and unconstrained, Continuing


Thanks,
Wojtek



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

end of thread, other threads:[~2003-01-28  4:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-25 22:31 Prefix to 'ACCESS must either statically match... But why? Wojtek Narczynski
2003-01-26  9:57 ` Martin Krischik
2003-01-27 19:30 ` Vadim Godunko
2003-01-28  4:42   ` GNAT / Aonix compiler incompatibility (Was: Prefix to 'ACCESS must either statically match... But why?) Wojtek Narczynski

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