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,83f37cdf3c91adc6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-02 10:44:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsfeed.cs.wisc.edu!144.212.100.101.MISMATCH!newsfeed!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: variant record and pointer Date: 02 May 2003 13:44:46 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <67ac8b2c.0305020925.6c27576d@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1051897486 17492 199.172.62.241 (2 May 2003 17:44:46 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 2 May 2003 17:44:46 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:36878 Date: 2003-05-02T13:44:46-04:00 List-Id: Manu-CSS@gmx.de (Noivet) writes: > s.side := 10; <------ and I wondered that the compiler compiled > successfully! > I expected a conflict, but there isn't. > is there something wrong with my declaration > of the pointer type? or can someone explain me that? There is a run-time check. In general, the compiler can't know the discriminant of s at compile time. If you turn on warnings, a good compiler might warn, in some cases. But in general, you have to run the program and trip over a Constraint_Error. - Bob