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,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3821e3559d170f28,start 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: Access1 := new Accessed_Type; Access1 = Access2 ...?! Date: Sat, 27 Nov 2004 13:12:13 +0100 Message-ID: <30r96lF34a891U1@uni-berlin.de> X-Trace: news.uni-berlin.de 6d6ZchD64luF2DUMg7i2UgA0YWNlJw9SI3rIfDb6TfriiI1hg= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Xref: g2news1.google.com comp.lang.ada:6549 Date: 2004-11-27T13:12:13+01:00 List-Id: Hi, I'm quite new to Ada and I hope someone can explain this to me: I've got the following code: Parent_State is assigned some already existing Vessel_State_Type variable, or null. State_Access := new Vessel_State_Type; State_Access.All.Previous_State := Parent_State; if State_Access /= null then if State_Access = State_Access.All.Previous_State then raise MyEx; end if; end if; Now, why is MyEx raised? Parent_State should refer to an already existent variable, whereas (I thought) the variable State_Access points to is just created in the beginning of that block ...? If the above code does not what I thought it did, how can I achieve that? ;-) TIA Florian Haag