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.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3821e3559d170f28 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Florian Haag" Newsgroups: comp.lang.ada Subject: Re: Access1 := new Accessed_Type; Access1 = Access2 ...?! Date: Mon, 29 Nov 2004 18:54:31 +0100 Message-ID: <31160cF373778U1@uni-berlin.de> References: X-Trace: news.uni-berlin.de foP4h+i809McLgo13WX6pgdLY/N9quKJ0KDKRj4EpAAyG2gSE= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:6645 Date: 2004-11-29T18:54:31+01:00 List-Id: "Christoph Karl Walter Grein" schrieb im Newsbeitrag news:mailman.148.1101711116.10401.comp.lang.ada@ada-france.org... >> State_Access := new Vessel_State_Type; >> State_Access.All.Previous_State := Parent_State; >> if State_Access /= null then > > this if statement comes too late: > If State_Access = null, then the preceding assignment to > State_Access.All.Previous_State would raise an exception: > Constraint_Error, because the dereference State_Access.All is impossible. This was just inserted for debugging reasons ... I wanted to check whether State_Access was null because I couldn't believe what was happening ;-) Regards, Florian Haag