From: "kat-Zygfryd" <6667@wp.pl>
Subject: Re: for x'address or variant
Date: Sun, 20 Apr 2003 20:07:06 +0200
Date: 2003-04-20T18:07:34+00:00 [thread overview]
Message-ID: <b7unl6$4hm$1@news.onet.pl> (raw)
In-Reply-To: x7v1xzxjg86.fsf@smaug.pushface.org
"Simon Wright" <simon@pushface.org> wrote in message
news:x7v1xzxjg86.fsf@smaug.pushface.org...
> "kat-Zygfryd" <6667@wp.pl> writes:
> Nick's solution looks pretty good to me, in general anything which
> uses arrays indexed by (1..2) rather than some problem-specific index
> like Nick's, or which relies on 'Address, is at best suspect!
If you say so, I just thought that using a component
would be at least an instruction or two faster than
indexing an array [but I need the array solution also
in some places].
Anyway it could be useful to enable use of unrestricted
variants in Ada 2005, I guess just that programmers using
the feature would need to know what they are doing.
(Which is quite certain since Ada programmers are
very careful, geneticly ;P )
example:
record
case not_needed_selector is
when sth => B32: Integer;
when sth => B8_1,B8_2,B8_3,B8_4:Byte;
when sth => array(1..4) of Byte;
end case;
end record;
or something alike, no more explicit typecasts needed in such case
Zygfryd
next prev parent reply other threads:[~2003-04-20 18:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-20 11:50 for x'address or variant kat-Zygfryd
2003-04-20 14:05 ` James S. Rogers
2003-04-20 15:17 ` Steve
2003-04-20 16:19 ` Nick Roberts
2003-04-20 16:57 ` kat-Zygfryd
2003-04-20 16:17 ` Simon Wright
2003-04-20 18:07 ` kat-Zygfryd [this message]
2003-04-20 19:39 ` Robert A Duff
2003-04-20 21:17 ` kat-Zygfryd
2003-04-21 2:25 ` John R. Strohm
2003-04-21 10:26 ` kat-Zygfryd
2003-04-21 12:59 ` Robert A Duff
2003-04-21 16:29 ` kat-Zygfryd
2003-04-21 17:25 ` tmoran
2003-04-21 19:48 ` Robert A Duff
2003-04-21 20:12 ` kat-Zygfryd
2003-04-21 20:55 ` Robert A Duff
2003-04-22 12:02 ` John R. Strohm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox