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-Thread: 103376,115cdbb394b3e615 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Sender: obry@PASCAL Newsgroups: comp.lang.ada Subject: Re: Why can't you create a out of order subtype? References: <1107301914.648240.237290@g14g2000cwa.googlegroups.com> From: Pascal Obry Date: 02 Feb 2005 19:50:30 +0100 Message-ID: Organization: Home - http://www.obry.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 82.120.30.12 X-Trace: 1107370232 news.wanadoo.fr 2157 82.120.30.12:1924 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:8135 Date: 2005-02-02T19:50:30+01:00 List-Id: Marius Amado Alves writes: > declare > M : Msg := Whatever; > V : Vowelmsg; > begin > V := Vowelmsg'Value (Msg'Image (M)); > -- if control reaches here then M is a vowel > exception > when Constraint_Error => -- M is not a vowel > end; I don't think this is good style. The above code use exception for non exceptional case. It uses exception as a if statement. Definitely something to avoid. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595