comp.lang.ada
 help / color / mirror / Atom feed
* Re: Attribute Definitions and other questions
       [not found] <000201c53293$f0e4b970$0401a8c0@thinkpad>
@ 2005-04-12  6:49 ` Duncan Sands
  2005-04-12 18:40   ` Jeffrey Carter
  2005-04-13  7:26   ` Dmitry A. Kazakov
  0 siblings, 2 replies; 3+ messages in thread
From: Duncan Sands @ 2005-04-12  6:49 UTC (permalink / raw)
  To: Andrew Carroll; +Cc: Comp. Lang. Ada

> Let's say I have a tagged type T.
> 
> type T is tagged ...
> <blah>
> end T;
> 
> Later I declared some variables of type T.
> var1: T;
> var2: T;
> 
> what attribute distinguishes the different "instances" of T (var1 and var2)?

T'Address

D.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Attribute Definitions and other questions
  2005-04-12  6:49 ` Attribute Definitions and other questions Duncan Sands
@ 2005-04-12 18:40   ` Jeffrey Carter
  2005-04-13  7:26   ` Dmitry A. Kazakov
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey Carter @ 2005-04-12 18:40 UTC (permalink / raw)


Duncan Sands wrote:
>>Let's say I have a tagged type T.
>>
>>type T is tagged ...
>><blah>
>>end T;
>>
>>Later I declared some variables of type T.
>>var1: T;
>>var2: T;
>>
>>what attribute distinguishes the different "instances" of T (var1 and var2)?
> 
> T'Address

T is a type. 'Address is meaningless for it.

Var1 and Var2 are distinguished by having different names, but you can 
also look at 'Tag (for tagged types only).

-- 
Jeff Carter
"Pray that there's intelligent life somewhere up in
space, 'cause there's bugger all down here on earth."
Monty Python's Meaning of Life
61



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Attribute Definitions and other questions
  2005-04-12  6:49 ` Attribute Definitions and other questions Duncan Sands
  2005-04-12 18:40   ` Jeffrey Carter
@ 2005-04-13  7:26   ` Dmitry A. Kazakov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry A. Kazakov @ 2005-04-13  7:26 UTC (permalink / raw)


On Tue, 12 Apr 2005 08:49:43 +0200, Duncan Sands wrote:

>> Let's say I have a tagged type T.
>> 
>> type T is tagged ...
>> <blah>
>> end T;
>> 
>> Later I declared some variables of type T.
>> var1: T;
>> var2: T;
>> 
>> what attribute distinguishes the different "instances" of T (var1 and var2)?
> 
> T'Address

X'Access, with a note that tagged types are by-reference ones, which
ensures that different instances are distinguishable.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-13  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <000201c53293$f0e4b970$0401a8c0@thinkpad>
2005-04-12  6:49 ` Attribute Definitions and other questions Duncan Sands
2005-04-12 18:40   ` Jeffrey Carter
2005-04-13  7:26   ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox