comp.lang.ada
 help / color / mirror / Atom feed
* Attributes
@ 1998-10-29  0:00 Alessandro
  1998-10-29  0:00 ` Attributes Tucker Taft
  0 siblings, 1 reply; 2+ messages in thread
From: Alessandro @ 1998-10-29  0:00 UTC (permalink / raw)


does an attribute exist for getting a type from an object (i.e.
variable)?

example in objects renaming

package X is
        Zero : Integer;
end X;


with X;

procedure Alfa is

 XZero : Integer renames X.Zero;
 -- or if  the attribute exist
 -- XZero : X.Zero' .....     renames X.Zero

begin
...
end Alfa;

--------------------------
Thanks,

Alessandro
busato@newtech.it
Trieste (Italy)
NE&T





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

* Re: Attributes
  1998-10-29  0:00 Attributes Alessandro
@ 1998-10-29  0:00 ` Tucker Taft
  0 siblings, 0 replies; 2+ messages in thread
From: Tucker Taft @ 1998-10-29  0:00 UTC (permalink / raw)


Alessandro (busato@newtech.it) wrote:

: does an attribute exist for getting a type from an object (i.e.
: variable)?

No.  About the closest you can come is initializing a
class-wide object by copying an existing object.  The
new class-wide object's tag is determined by the original
object's tag.  (This capability is analogous to the "x like y" 
capability of Eiffel.)  For example:

   X : T'Class := Y;


: ...
: Thanks,

: Alessandro
: busato@newtech.it
: Trieste (Italy)
: NE&T

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA
An AverStar Company




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

end of thread, other threads:[~1998-10-29  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-29  0:00 Attributes Alessandro
1998-10-29  0:00 ` Attributes Tucker Taft

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