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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b69d2b87c02b5151,start X-Google-Attributes: gid103376,public From: arnold@nospam.com (Stephen Arnold) Subject: Numerical exceptions not raised properly? Date: 1999/11/01 Message-ID: <7vkgnl$u5@chronicle.concentric.net>#1/1 X-Deja-AN: 543146703 Organization: ENSCO Inc. Newsgroups: comp.lang.ada Date: 1999-11-01T00:00:00+00:00 List-Id: Howdy folks: I'm pretty new to Ada, as well as GNAT, so this could be due to my own ignorance (rather than a GNAT problem), but it seems that certain exceptions are not being raised properly. Setup: Win95b with latest GNAT 3.12p package. When I compile and run some simple code (I'm doing the Lovelace tutorial): with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure Compute is procedure Double(Item : in out Integer) is begin -- procedure Double. Item := Item + 2; end Double; X : Integer := 1; -- Local variable X of type Integer. begin -- procedure Compute loop Put_Line("X = "); Put(X); New_Line; Double(X); end loop; end Compute; It doesn't seem to raise an exception when X gets too big (ie, you can see it wrap negative, then it goes to zero and stays there). When I try dividing by zero, the exception is raised correctly. Is there something I'm missing, or? Thanks in advance, Steve Arnold