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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,239b92bbdaf8d8d3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-02 13:23:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!feed.textport.net!out.nntp.be!propagator-SanJose!news-in-sanjose!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Array of exception References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Tue, 02 Oct 2001 20:23:11 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 1002054191 24.7.82.199 (Tue, 02 Oct 2001 13:23:11 PDT) NNTP-Posting-Date: Tue, 02 Oct 2001 13:23:11 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:13649 Date: 2001-10-02T20:23:11+00:00 List-Id: > 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.