comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Array of exception
Date: Tue, 02 Oct 2001 20:23:11 GMT
Date: 2001-10-02T20:23:11+00:00	[thread overview]
Message-ID: <Pmpu7.2877$403.1630126@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: slrn9rj4q6.kf.lutz@taranis.iks-jena.de

>     when -1 => raise EXXX;
>     when -2 => raise EYYY;
>     ...
>Using Exception_Id and Raise_Expression require me to rewrite the whole CASE
>into an explicit array so I do not shorten the source code anyway. Only the
  Clarify please.  It appears that somewhere you need to establish the
relation between, eg, -2 and EYYY.  Is
   case res is
      when -1 => raise EXXX;
      when -2 => raise EYYY;
      ...
preferable to
   jump : constant array(...) of Exception_ID :=
     (-1 => EXXX'Identity,
      -2 => EYYY'Identity,
      ...
Of course one always wonders if a jump table is the best approach for the
problem at hand.



  reply	other threads:[~2001-10-02 20:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02  8:50 Array of exception Lutz Donnerhacke
2001-10-02 11:02 ` maa
2001-10-02 10:13   ` Lutz Donnerhacke
2001-10-02 20:23     ` tmoran [this message]
2001-10-03 16:25       ` Darren New
2001-10-04  8:53       ` Lutz Donnerhacke
replies disabled

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