lee@infotec.UUCP (Lee Van Dyke) (06/14/91)
I can compile with the following warnings:
Betain := One / Beta;
A := One;
for I in 1..Negep loop
------------^A ###
--### A:warning: id hides outer definition
exit when I > Negep;
A := A * Betain;
end loop;
B := A;
while ((One - A) - One) = Zero loop
A := A * Beta;
Negep := Negep - 1;
end loop;
Negep := - Negep;
Ngrd := 0;
if ((Irnd = 0) and ((One + Eps) * One - One) /= Zero) then
Ngrd := 1;
end if;
Find_Iexp:
declare
Y : Floating := 1.0;
----------------^A ###
--### A:warning: id hides outer definition
A : Floating := Betain;
----------------^A ###
--### A:warning: id hides outer definition
I : Integer := 0;
----------------^A ###
--### A:warning: id hides outer definition
begin
loop
Y := A * A;
exit when Y = 0.0;
I := I + 1;
A := Y;
end loop;
A := Y;
end loop;
Iexp := I;
end Find_Iexp;
Find_Smallest:
declare
A, Y : Floating := 1.0;
----------------^A ###
-------------------^B ###
--### A:warning: id hides outer definition
--### B:warning: id hides outer definition
I : Integer := 0;
----------------^A ###
--### A:warning: id hides outer definition
begin
loop
Y := A / Beta;
exit when Y = 0.0;
I := I - 1;
A := Y;
end loop;
Minexp := I;
end loop;
Minexp := I;
Xmin := A;
end Find_Smallest;
Find_Largest:
declare
A, Y : Floating := 1.0;
----------------^A ###
-------------------^B ###
--### A:warning: id hides outer definition
--### B:warning: id hides outer definition
I : Integer := 1;
----------------^A ###
--### A:warning: id hides outer definition
begin
loop
Y := A * Beta;
I := I + 1;
A := Y;
end loop;
exception
B := One;
C := Max (Alxmax, Log (Xmin)) / Log (100.0);
Dely := - C - C;
-----------------------------------------------------------------------
-- RANDOM ARGUMENT ACCURACY TESTS
-----------------------------------------------------------------------
for J in 1..4 loop
------------^A ###
--### A:warning: id hides outer definition
K1 := 0;
K3 := 0;
X1 := Zero;
R6 := Zero;
R7 := Zero;
Del := (B - A) / Xn;
Xl := A;
for I in 1..N loop
X := Del * Ran + Xl;
case J is
when 1 =>
Zz := X ** One;
**********************************************************************
So I ignore the warnings with the -w, and link with the generic math
routines. Then the crash occurs when I run:
test_math_functions
** MAIN PROGRAM ABANDONED -- EXCEPTION "numeric_error" RAISED
Lee Van Dyke UUCP: ...sun!sunkist!infotec!lee
Infotec or
Costa Mesa, CA ...zardoz!infotec!lee
(714) 241-8254
--
Lee Van Dyke UUCP: ...sun!sunkist!infotec!lee
Infotec or
Costa Mesa, CA ...zardoz!infotec!lee
(714) 241-8254dlindsle@afit.af.mil (David T. Lindsley) (06/15/91)
lee@infotec.UUCP (Lee Van Dyke) writes: [stuff deleted] > Find_Iexp: > declare > Y : Floating := 1.0; > A : Floating := Betain; > I : Integer := 0; > begin > loop > Y := A * A; > exit when Y = 0.0; > I := I + 1; > A := Y; > end loop; Could someone please refer me to where these "declare" segments are explained in the LRM? (Yes, I'm quite sure this is an FAQ, but...) -- Dave Lindsley #24601# OPINIONS. MINE. (Nobody tells me dlindsle@blackbird.afit.af.mil anything anyway, so I can't possibly ?? lamroN eb yhW ?? be anybody's mouthpiece...)