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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f84446733b06aca X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,2f84446733b06aca X-Google-Attributes: gid109fba,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Converting C++ class to Ada Date: 1996/12/20 Message-ID: #1/1 X-Deja-AN: 205039664 sender: news@organon.com (news) references: <32ADF183.7195@lmtas.lmco.com> organization: Organon Motives, Inc. newsgroups: comp.lang.ada,comp.lang.c++ Date: 1996-12-20T00:00:00+00:00 List-Id: In article mheaney@ni.net (Matthew Heaney) writes: > In article , jsa@alexandria (Jon S Anthony) wrote: > > > >> Also, if I wanted to make sure that "null" wasn't used as one of the > >> discriminants, would I have to use "access Motor.Object_Type" rather > >> than the declared access type? > > > >Neither will prevent that. > > I thought that access discriminants (and parameters) without an explicit > type raise Program_Error when you pass "null" as the value? CE is raised if a null value is passed to an access _parameter_. I have never seen anything indicating that CE (or PE) is raised if a null value is given for the value of an access _discriminant_. A good thing IMO on both counts. See in particular 11.5(11) Of course, given a recent little discussion on the GNAT chat list I could simply have not found it yet... :-) But really, this point seems pretty clear! /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com