* Re: Type qualification & entry calls - can they mix?
1996-08-29 0:00 Type qualification & entry calls - can they mix? Dale Stanbrough
@ 1996-08-29 0:00 ` Dale Stanbrough
1996-08-30 0:00 ` Robert A Duff
1996-08-30 0:00 ` David Weller
1 sibling, 1 reply; 4+ messages in thread
From: Dale Stanbrough @ 1996-08-29 0:00 UTC (permalink / raw)
>Then should the following be legal?
>
>
> list'(prots(1)).a;
grrrrr....
that should of course have said...
fred'(prots(1)).a;
Dale
^ permalink raw reply [flat|nested] 4+ messages in thread
* Type qualification & entry calls - can they mix?
@ 1996-08-29 0:00 Dale Stanbrough
1996-08-29 0:00 ` Dale Stanbrough
1996-08-30 0:00 ` David Weller
0 siblings, 2 replies; 4+ messages in thread
From: Dale Stanbrough @ 1996-08-29 0:00 UTC (permalink / raw)
Consider the following...
protected type fred is
entry a;
end fred;
type list is array(1..10) of fred;
prots :list;
Then should the following be legal?
list'(prots(1)).a;
Dale
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Type qualification & entry calls - can they mix?
1996-08-29 0:00 Type qualification & entry calls - can they mix? Dale Stanbrough
1996-08-29 0:00 ` Dale Stanbrough
@ 1996-08-30 0:00 ` David Weller
1 sibling, 0 replies; 4+ messages in thread
From: David Weller @ 1996-08-30 0:00 UTC (permalink / raw)
In article <503itr$aij@goanna.cs.rmit.edu.au>,
Dale Stanbrough <dale@goanna.cs.rmit.edu.au> wrote:
>Consider the following...
> protected type fred is
> entry a;
> end fred;
> type list is array(1..10) of fred;
> prots :list;
>Then should the following be legal?
> list'(prots(1)).a;
>
I believe you meant:
fred'(prots(1)).a;
But I'm not sure why type qualification would even
be necessary in this case.
--
Visit the Ada 95 Booch Components Homepage: www.ocsystems.com/booch
This is not your father's Ada -- lglwww.epfl.ch/Ada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Type qualification & entry calls - can they mix?
1996-08-29 0:00 ` Dale Stanbrough
@ 1996-08-30 0:00 ` Robert A Duff
0 siblings, 0 replies; 4+ messages in thread
From: Robert A Duff @ 1996-08-30 0:00 UTC (permalink / raw)
In article <503j4h$apb@goanna.cs.rmit.edu.au>,
Dale Stanbrough <dale@goanna.cs.rmit.edu.au> wrote:
>that should of course have said...
>
> fred'(prots(1)).a;
It is illegal by the syntax rules, because a qualified_expression is an
expression but not a name, and the prefix before the dot has to be a
name (or an impliit_dereference, which is also a name -- aren't
ambiguous grammars fun?).
There are cases where I have wanted to use a qualification as a name, so
this restriction is mildly annoying.
Ada 95 changed some things from expressions to names. Type_conversions,
for example. IMHO, we should have gone all the way, and totally
eliminated the distinction between names and other expressions. The
distinction is unhelpful, and in a few cases, gets in the way.
Certainly a qualified_expression should be allowed in exactly the same
places as a type_conversion.
- Bob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-08-30 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-29 0:00 Type qualification & entry calls - can they mix? Dale Stanbrough
1996-08-29 0:00 ` Dale Stanbrough
1996-08-30 0:00 ` Robert A Duff
1996-08-30 0:00 ` David Weller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox