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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:8184:: with SMTP id n4mr852650jag.7.1553983993005; Sat, 30 Mar 2019 15:13:13 -0700 (PDT) X-Received: by 2002:a9d:5509:: with SMTP id l9mr38372398oth.195.1553983992757; Sat, 30 Mar 2019 15:13:12 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!136no292722itk.0!news-out.google.com!r82ni312ita.0!nntp.google.com!136no292718itk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 30 Mar 2019 15:13:12 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: <36c2ff61-8cca-4435-995f-dfc34fa44b69@googlegroups.com> <511923fb-dbb9-4e33-82a8-b4bbbf002a6d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: type definition for an integer with discrete range From: Jere Injection-Date: Sat, 30 Mar 2019 22:13:12 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56020 Date: 2019-03-30T15:13:12-07:00 List-Id: On Saturday, March 30, 2019 at 4:44:07 PM UTC-4, mario.b...@gmail.com wrote: > Great, that brings me a lot further. I updated the file at > https://github.com/Blunk-electronic/ada_training/blob/master/src/type_angle/type_angle.adb > Two more questions: > 1. How can I catch the exception SYSTEM.ASSERTIONS.ASSERT_FAILURE in the exception handler ? See line 26. > 2. How can I print the "gap size" via put ? See line 28. > > Thanks to all of you out there. 1. Add a "with" for System.Assertions, uncomment line 26, add your handling code. 2. Declare a constant: Angle_Delta : constant := 5; Use it in your Dynamic_Predicate and then in your print statement, do Integer'Image(Angle_Delta);