comp.lang.ada
 help / color / mirror / Atom feed
From: "Christoph Karl Walter Grein" <AdaMagica@web.de>
To: comp.lang.ada@ada-france.org
Subject: Re: Access1 := new Accessed_Type; Access1 = Access2 ...?!
Date: Mon, 29 Nov 2004 07:51:28 +0100
Date: 2004-11-29T07:51:28+01:00	[thread overview]
Message-ID: <mailman.148.1101711116.10401.comp.lang.ada@ada-france.org> (raw)

> 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.

>  if State_Access = State_Access.All.Previous_State then
>    raise MyEx;
>  end if;
> end if;

__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201




             reply	other threads:[~2004-11-29  6:51 UTC|newest]

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

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