From: wojtek@power.com.pl (Wojtek Narczynski)
Subject: Re: Prefix to 'ACCESS must either statically match... But why?
Date: 27 Jan 2003 18:51:20 -0800
Date: 2003-01-28T02:51:20+00:00 [thread overview]
Message-ID: <5ad0dd8a.0301271851.7c907f60@posting.google.com> (raw)
In-Reply-To: PriZ9.6187$rq4.561874@bgtnsc05-news.ops.worldnet.att.net
"James S. Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message news:<PriZ9.6187$rq4.561874@bgtnsc05-news.ops.worldnet.att.net>...
> If you want to use a more general access to string try using an access
> to an unbounded string. See the following:
Uhm, I switched to String from Stream_Element_Array because the old
GNAT code example used it. In my project there is something like this:
subtype Content_Length_Type is
Stream_Element_Count range 0 .. 2 ** 16 - 1;
subtype Padding_Length_Type
is Stream_Element_Count range 0 .. 2 ** 8 - 1;
type Content_Type
( Content_Length : Content_Length_Type;
Padding_Length : Padding_Length_Type )
is record
Content : aliased Stream_Element_Array( 1..Content_Length );
case Padding_Length is
when 0 => null;
when others => Padding : Stream_Element_Array( 1..Padding_Length
);
end case;
end record;
First I read a header with Content_Length and Padding_Length from
socket, then I use declare to read the actual content in another
syscall.
Then I wanted to pass the access to Content to a function that accepts
access Stream_Element_Array as its parameter. Looks like this cannot
be done though.
And in general I find the inablility to declare access type subtypes
in parallel with the subtypes for the designated type obstructive.
Thanks,
Wojtek
next prev parent reply other threads:[~2003-01-28 2:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-27 7:12 Prefix to 'ACCESS must either statically match... But why? Grein, Christoph
2003-01-27 15:46 ` Wojtek Narczynski
2003-01-27 22:32 ` James S. Rogers
2003-01-28 2:51 ` Wojtek Narczynski [this message]
2003-01-28 3:19 ` James S. Rogers
2003-01-28 12:14 ` Wojtek Narczynski
2003-01-28 14:43 ` James S. Rogers
2003-01-28 20:20 ` Wojtek Narczynski
2003-01-28 21:36 ` James S. Rogers
2003-01-29 2:09 ` tmoran
2003-01-29 11:21 ` Wojtek Narczynski
-- strict thread matches above, loose matches on Subject: below --
2003-01-30 6:20 Grein, Christoph
2003-01-29 12:15 Grein, Christoph
2003-01-29 11:57 Grein, Christoph
2003-01-29 6:50 Grein, Christoph
2003-01-29 11:30 ` Wojtek Narczynski
2003-01-27 6:41 Grein, Christoph
2003-01-27 18:33 ` Martin Krischik
2003-01-27 19:05 ` Jeffrey Carter
2003-01-25 22:31 Wojtek Narczynski
2003-01-26 9:57 ` Martin Krischik
2003-01-27 19:30 ` Vadim Godunko
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox