From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,39f3c359196fe8b4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-20 11:07:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail From: "kat-Zygfryd" <6667@wp.pl> Newsgroups: comp.lang.ada Subject: Re: for x'address or variant Date: Sun, 20 Apr 2003 20:07:06 +0200 Organization: news.onet.pl Sender: samael_@op.pl@pl171.poznan.cvx.ppp.tpnet.pl Message-ID: References: NNTP-Posting-Host: pl171.poznan.cvx.ppp.tpnet.pl X-Trace: news.onet.pl 1050862054 4662 217.99.113.171 (20 Apr 2003 18:07:34 GMT) X-Complaints-To: abuse@onet.pl NNTP-Posting-Date: 20 Apr 2003 18:07:34 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:36323 Date: 2003-04-20T18:07:34+00:00 List-Id: "Simon Wright" 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