* Has anyone gotten test_math.a to run on a Sun4/OS 4.1 using VADS 6.0 ?
@ 1991-06-13 17:33 Lee Van Dyke
1991-06-14 17:12 ` David T. Lindsley
0 siblings, 1 reply; 3+ messages in thread
From: Lee Van Dyke @ 1991-06-13 17:33 UTC (permalink / raw)
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-8254
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Has anyone gotten test_math.a to run on a Sun4/OS 4.1 using VADS 6.0 ?
1991-06-13 17:33 Has anyone gotten test_math.a to run on a Sun4/OS 4.1 using VADS 6.0 ? Lee Van Dyke
@ 1991-06-14 17:12 ` David T. Lindsley
1991-06-15 1:42 ` Block Statements and the DECLARE reserved word Michael Feldman
0 siblings, 1 reply; 3+ messages in thread
From: David T. Lindsley @ 1991-06-14 17:12 UTC (permalink / raw)
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...)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Block Statements and the DECLARE reserved word
1991-06-14 17:12 ` David T. Lindsley
@ 1991-06-15 1:42 ` Michael Feldman
0 siblings, 0 replies; 3+ messages in thread
From: Michael Feldman @ 1991-06-15 1:42 UTC (permalink / raw)
In article <1991Jun14.171209.10860@afit.af.mil> dlindsle@afit.af.mil (David T. Lindsley) writes:
>
>[stuff deleted]
>
>Could someone please refer me to where these "declare" segments are
>explained in the LRM?
>
Have a look at section 5.6, "Block Statements"
---------------------------------------------------------------------------
Prof. Michael Feldman
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052 U.S.A.
phone 202-994-5253
fax 202-994-5296
email mfeldman@seas.gwu.edu
---------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1991-06-15 1:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-06-13 17:33 Has anyone gotten test_math.a to run on a Sun4/OS 4.1 using VADS 6.0 ? Lee Van Dyke
1991-06-14 17:12 ` David T. Lindsley
1991-06-15 1:42 ` Block Statements and the DECLARE reserved word Michael Feldman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox