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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13703514e3723cbe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-14 04:54:44 PST From: "Martin Dowie" Newsgroups: comp.lang.ada References: <9l7qon$d78$1@nntp9.atl.mindspring.net> <7E0e7.12187$vW2.6599957@news1.sttln1.wa.home.com> <9la73h$vvs$1@slb6.atl.mindspring.net> <3b78d2d4$1@pull.gecm.com> Subject: Re: C-style 'union' in Ada? Date: Tue, 14 Aug 2001 12:49:19 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: sg2c11210.dsge.edinbr.gmav.gecm.com Message-ID: <3b790efb@pull.gecm.com> X-Trace: 14 Aug 2001 12:43:55 GMT, sg2c11210.dsge.edinbr.gmav.gecm.com Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!sg2c11210.dsge.edinbr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:11905 Date: 2001-08-14T12:49:19+01:00 List-Id: Ole-Hjalmar Kristensen wrote in message news:umqsnev3rqb.fsf@maestro.clustra.com... > "Martin Dowie" writes: > > > The trick (if you could call it that!) is to include a default value > > for the discriminant in the type definition. You can then change its > > value at will. If you don't have a default then you have to contraint > > the object when you declare it - which then fixes it to that value. > > Yes, but you can only change it with a whole record assignment. of course - and I think this is what the OP wanted