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-03 09:25:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!news-east.rr.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BBB3BE4.88B59DC1@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Array of exception References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 03 Oct 2001 16:25:20 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1002126320 66.75.151.160 (Wed, 03 Oct 2001 09:25:20 PDT) NNTP-Posting-Date: Wed, 03 Oct 2001 09:25:20 PDT Xref: archiver1.google.com comp.lang.ada:13679 Date: 2001-10-03T16:25:20+00:00 List-Id: tmoran@acm.org wrote: > > > 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 Coming from an interpreted-language background, the first thing that jumped to my mind was to name everything like EXXX_1 : exception; EYYY_2 : exception; EZZZ_3 : exception; Then get the names of the exceptions, parse for the final underline, convert to an integer, and away you go. That's probably not very Ada tho. ;-) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. Who is this Dr. Ibid anyway, and how does he know so much?