From: aio!sweetpea.jsc.nasa.gov!yow@eos.arc.nasa.gov (Bill Yow)
Subject: Re: Is this valid Ada?
Date: 8 Nov 91 15:43:24 GMT [thread overview]
Message-ID: <1991Nov8.154324.10094@aio.jsc.nasa.gov> (raw)
In article <37806@shamash.cdc.com>, case@shamash.cdc.com (Steven V. Case) write
s:
|> Anyone care to offer an opinion?
|>
|> ----------------------------------------
|>
|> PACKAGE Ambiguous_Type IS
|>
|> TYPE Is_This_Ambiguous IS NEW Integer;
|>
|> END Ambiguous_Type;
|>
|> ----------------------------------------
|>
|> WITH Ambiguous_Type; USE Ambiguous_Type;
|>
|> PROCEDURE Test IS
|>
|> PROCEDURE Is_This_Ambiguous IS
|> BEGIN
|> NULL;
|> END Is_This_Ambiguous;
|>
|> BEGIN
|>
|> Is_This_Ambiguous;
|>
|> END Test;
|>
Yes, it is legal.
The two compilers that correctly compiled the program realized that
begin
Is_This_Ambiguous;
end test;
has to be a call to the procedure Test.Is_This_Ambiguous because having the
Ambiguous_Type.Is_This_Ambiguous type there would have been an error.
Would having the type there be a Syntactic or Semantic error?
The other two compilers are being lazy and not looking at what the overloaded
symbol is (type, procedure).
Now the question is, should not all Ada compilers compile this?
I could see this error causing major portability problems for someone.
|> ----------------------------------------
|> --
|> ____ ____ Steve Case - HQG526 email: case@shamash.cdc.co
m
|> / ___||___ \ Control Data Corporation AT&T : (612) 853-3345
|> | |___ ___| | 3101 East 80th Street
|> \____||____/ Bloomington, MN 55425
Later,
Bill Yow
(713) 283-4051
yow@sweetpea.jsc.nasa.gov
byow@mcimail.com
My opinions are my own!
next reply other threads:[~1991-11-08 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-11-08 15:43 Bill Yow [this message]
-- strict thread matches above, loose matches on Subject: below --
1991-11-08 20:53 Is this valid Ada? csn!news.den.mmc.com!possum.den.mmc.com!dow
1991-11-08 13:31 Jack Dean
1991-11-08 5:14 cis.ohio-state.edu!magnus.acs.ohio-state.edu!paperboy.micro.umn.edu!cs.um
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox