comp.lang.ada
 help / color / mirror / Atom feed
From: "Florian Haag" <florianhaag@yahoo.de>
Subject: Access1 := new Accessed_Type; Access1 = Access2 ...?!
Date: Sat, 27 Nov 2004 13:12:13 +0100
Date: 2004-11-27T13:12:13+01:00	[thread overview]
Message-ID: <30r96lF34a891U1@uni-berlin.de> (raw)

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






             reply	other threads:[~2004-11-27 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27 12:12 Florian Haag [this message]
2004-11-27 13:58 ` Access1 := new Accessed_Type; Access1 = Access2 ...?! Jeff C r e e.m
2004-11-28  9:56   ` Florian Haag
2004-11-27 20:42 ` Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2004-11-29  6:51 Christoph Karl Walter Grein
2004-11-29 17:54 ` Florian Haag
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox